def METHOD_NAME(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