code: def process_custom(custom):
      
  
      custom_selectors = {}
      if custom is not None:
          for key, value in custom.items():
              name = util.lower(key)
              if RE_CUSTOM.match(name) is None:
                  raise SelectorSyntaxError("The name '{}' is not a valid custom pseudo-class name".format(name))
              if name in custom_selectors:
                  raise KeyError("The custom selector '{}' has already been registered".format(name))
              custom_selectors[css_unescape(name)] = value
      return custom_selectors
docs: Process custom.