<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def path_filter(extensions, exclude_paths=None):
 """ Returns a function that returns True if a filepath is acceptable. @param extensions An array of strings. Specifies what file extensions should be accepted by the filter. If None, we default to the Unix glob `*` and match every file extension. @param exclude_paths An array of strings which represents filepaths that should never be accepted by the filter. Unix shell-style wildcards are supported. @return function A filter function that will only return True when a filepath is acceptable under the above conditions. [True, False] [False, True] [True, True, False] [True, False] """

    exclude_paths = exclude_paths or []

    def the_filter(path):
        if not any(matches_extension(path, extension)
                   for extension in extensions):
            return False
        if exclude_paths:
            for excluded in exclude_paths:
                if (path.startswith(excluded) or
                        path.startswith('./' + excluded) or
                        fnmatch.fnmatch(path, excluded)):
                    return False
        return True
    return the_filter