Why it doesn't work:
In Python the "**" prefix in the arguments is to make one argument capture several other ones. For example:
SP = {'key1': 'value1','key2': 'value2'}
def test(**kwargs): #you don't have to name it "kwargs" but that is
print(kwargs) #the usual denomination
test(**SP)
test(key1='value1', key2='value2')
The two call on the test function are exactly the same
Defining a function with two ** arguments would be ambiguous, so your interpreter won't accept it, but you don't need it.
How to make it work:
It is not necessary to use ** when working with normal dictionary arguments: in that case you can simply do:
SP = {'key1': 'value1','key2': 'value2'}
CP = {'key1': 'value1','key2': 'value2'}
def test(SP,CP):
print(SP)
print(CP)
test(SP,CP)
Dictionaries are objects that you can directly use in your arguments. The only point where you need to be careful is not to modify directly the dictionary in argument if you want to keep the original dictionnary.
test(**{**SP,**CP})
if you prefer. (possibly because you're allergic to asymmetry or to the word dict.) – Entomostracan