import re


def _include(path, includes, excludes):
    """
    :params path: The file path to check whether to include
    :params includes: List of include regexs to apply
    :params excludes: List of exclude regexs to apply

    :returns True if the file path should be included, False

    """
    if includes is None:
        includes = []

    if excludes is None:
        excludes = []

    # If there are no regexs include the path
    if not includes and not excludes:
        return True

    include = not includes
    for i in includes:
        if re.match(i, path):
            include = True
            break

    for e in excludes:
        if re.match(e, path):
            include = False
            break

    return include