def METHOD_NAME(filename, file_content, expected_end_year,
                    found_start_year, headertype):
    """
    Create a function that, when called, fixes the copyright header.
    """
    # check if a fix can be created
    if headertype not in {NATIVELEGALHEADER, THIRDPARTYLEGALHEADER}:
        return None
    def year_fix_function():
        """
        Store the file with correct copyright years.
        """
        fixed_file, success = re.subn(
            OPENAGE_AUTHORS,
            OPENAGE_AUTHORTEMPLATE.format(crstart=found_start_year,
                                          crend=expected_end_year),
            file_content
        )
        if not success:
            raise ValueError("copyright year fix did not suceeed")
        writefile(filename, fixed_file)
        return f"Copyright for {filename} was fixed."
    return year_fix_function