<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def url_is(white_list):
 """ Function generator. Args: white_list (dict):
 dict with PREFIXES and CONSTANTS keys (list values). Returns: """

    def func(url):
        prefixes = white_list.get('PREFIXES', ())
        for prefix in prefixes:
            if url.startswith(prefix):
                return True
        constants = white_list.get('CONSTANTS', ())
        for exact_url in constants:
            if url == exact_url:
                return True
        return False
    return func