def METHOD_NAME(
    base,
    languages=all_languages,
    dir_ignore=default_dir_ignore,
    file_ignore=default_file_ignore,
):
    """find all files in a directory and its subdirectories based on a
    set of languages, ignore directories specified in dir_ignore and
    files specified in file_ignore"""
    if base[-1] != "/":
        base += "/"
    def update_dirs(dirs):
        """strip the ignored directories out of the provided list"""
        index = len(dirs) - 1
        for i, d in enumerate(reversed(dirs)):
            if d in dir_ignore:
                del dirs[index - i]
    # walk over base
    for root, dirs, files in os.walk(base):
        root = root.replace(base, "", 1)
        # strip ignored directories from the list
        update_dirs(dirs)
        for filename in files:
            if filename in file_ignore:
                # skip ignored files
                continue
            # try to figure out the language of the specified file
            fullpath = os.path.join(base, root, filename)
            language = lang_type(fullpath)
            # if the file is one of the langauges that we want return
            # its name and the language
            if language in languages:
                yield fullpath, language