code: def _determine_keys(dictionary):
      
      optional = {}
      defaults = {}
      mandatory = {}
      types = {}
      for key, value in dictionary.items():
          if isinstance(key, Optional):
              optional[key.value] = parse_schema(value)
              if isinstance(value, BaseSchema) and\
                      value.default is not UNSPECIFIED:
                  defaults[key.value] = (value.default, value.null_values)
              continue  # pragma: nocover
  
          if type(key) is type:
              types[key] = parse_schema(value)
              continue
  
          mandatory[key] = parse_schema(value)
      return mandatory, optional, types, defaults
docs: Determine the different kinds of keys.