def METHOD_NAME(filename, description, type=None):
    if type and type.lower() == HISTFACTORY_FILE_TYPE.lower():
        return True
    if filename.endswith(HISTFACTORY_EXTENSIONS):
        description_lc = description.lower()
        for term in HISTFACTORY_TERMS:
            if term in description_lc:
                return True
    return False