docs: def _merge(self, key, value):
          """
          Internal merge logic implementation to allow merging of values when
          setting attributes/items.
  
          :param key: Attribute name or item key
          :type key: str
          :param value: Value to set attribute/item as.
          :type value: object
          :rtype: None
          """
          method = self._merge_method(key)
          if method is not None:
              # strings are special, update methods like set.update looks for
              # iterables
              if method == "update" and is_str(value):
                  value = [value]
              if (
                  method == "append"
                  and isinstance(self[key], list)
                  and isinstance(value, list)
              ):
                  # if rvalue is a list and given object is a list, we expect all
                  # values to be appended
                  method = "extend"
              getattr(self[key], method)(value)
          else:
              super(MergingDict, self).__setitem__(key, value)