def METHOD_NAME(
    index: "Index", targets: "TargetType", unpartial: bool = False, **kwargs
) -> Tuple["IndexView", "IndexView", List["Dependency"]]:
    """Return index view of imports which have not been fetched.
    Returns:
        Tuple in the form (legacy_view, view, changed_deps) where changed_imports is a
        list of import dependencies that cannot be fetched due to changed data source.
    """
    from dvc.cachemgr import LEGACY_HASH_NAMES
    changed_deps: List["Dependency"] = []
    def need_fetch(stage: "Stage", legacy: bool = False) -> bool:
        if not stage.is_import or (stage.is_partial_import and not unpartial):
            return False
        out = stage.outs[0]
        if not out.changed_cache():
            return False
        dep = stage.deps[0]
        if dep.changed_checksum():
            changed_deps.append(dep)
            return False
        if out.hash_name in LEGACY_HASH_NAMES and legacy:
            return True
        if out.hash_name not in LEGACY_HASH_NAMES and not legacy:
            return True
        return False
    legacy_unfetched = index.targets_view(
        targets,
        stage_filter=partial(need_fetch, legacy=True),
        **kwargs,
    )
    unfetched = index.targets_view(targets, stage_filter=need_fetch, **kwargs)
    return legacy_unfetched, unfetched, changed_deps