def deep_merge(base, extra):
 for key in extra:
  if ((key in base) and isinstance(base[key], dict) and isinstance(extra[key], dict)):
   deep_merge(base[key], extra[key])
   continue
  base[key] = extra[key]

def deep_merge ( base , extra ) : for key in extra : if ( ( key in base ) and isinstance ( base [ key ] , dict ) and isinstance ( extra [ key ] , dict ) ) : deep_merge ( base [ key ] , extra [ key ] ) continue base [ key ] = extra [ key ]
deeply two dictionaries .