def METHOD_NAME(version, build):
    """
    Sync/Update/Delete ImportedFiles objects of this version.
    :param version: Version instance
    :param build: Build id
    """
    project = version.project
    # Index new HTMLFiles to ElasticSearch
    index_new_files(model=HTMLFile, version=version, build=build)
    # Remove old HTMLFiles from ElasticSearch
    remove_indexed_files(
        model=HTMLFile,
        project_slug=version.project.slug,
        version_slug=version.slug,
        build_id=build,
    )
    # Delete ImportedFiles objects (including HTMLFiles)
    # from the previous build of the version.
    (
        ImportedFile.objects.filter(project=project, version=version)
        .exclude(build=build)
        .delete()
    )