code: def merge_dicts(i):
      
  
      a=i['dict1']
      b=i['dict2']
  
      for k in b:
          v=b[k]
          if type(v) is dict:
             if k not in a:
                a.update({k:b[k]})
             elif type(a[k])==dict:
                merge_dicts({'dict1':a[k], 'dict2':b[k]})
             else:
                a[k]=b[k]
          elif type(v) is list:
             a[k]=[]
             for y in v:
                 a[k].append(y)
          else:
             a[k]=b[k]
  
      return {'return':0, 'dict1':a}
docs: Input:  {
                dict1 - merge this dict with dict2 (will be directly modified!)
                dict2 - dict
  
      Output: {
                return       - return code =  0, if successful
  
                dict1        - output dict
              }