code: def _merge(self, a, b):
          
          for k, v in a.items():
              if isinstance(v, dict):
                  item = b.setdefault(k, {})
                  self._merge(v, item)
              elif isinstance(v, list):
                  item = b.setdefault(k, [{}])
                  if len(v) == 1 and isinstance(v[0], dict):
                      self._merge(v[0], item[0])
                  else:
                      b[k] = v
              else:
                  b[k] = v
          return b
docs: Merges a into b.