code: def _merge(x, y):
      
      merged = {**x, **y}
  
      xkeys = x.keys()
  
      for key in xkeys:
          if isinstance(x[key], dict) and key in y:
              merged[key] = _merge(x[key], y[key])
  
      return merged
docs: Merge two nested dictionaries. Overwrite values in x with values in y.