docs: def _merge(self, value):
          """
          Returns a dictionary based on `value` with each value recursively
          merged with `spec`.
          """
  
          if value is not None and not isinstance(value, dict):
              # bogus value; will not pass validation but should be preserved
              return value
  
          if not self._pairs:
              return {}
  
          collected = {}
  #        collected.update(value)
          for k_validator, v_validator in self._pairs:
              k_default = k_validator.get_default_for(None)
              if k_default is None:
                  continue
  
              # even None is ok
              if value:
                  v_for_this_k = value.get(k_default)
              else:
                  v_for_this_k = None
              v_default = v_validator.get_default_for(v_for_this_k)
              collected.update({k_default: v_default})
  
          if value:
              for k, v in value.items():
                  if k not in collected:
                      collected[k] = v
  
          return collected