<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def process_custom(custom):
 """Process 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