<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ignore_path(path, ignore_list=None, whitelist=None):
 """ Returns a boolean indicating if a path should be ignored given an ignore_list and a whitelist of glob patterns. """

    if ignore_list is None:
        return True

    should_ignore = matches_glob_list(path, ignore_list)
    if whitelist is None:
        return should_ignore

    return should_ignore and not matches_glob_list(path, whitelist)