code: def _split_legacy_hash_infos(
      hash_infos: Iterable["HashInfo"],
  ) -> Tuple[Set["HashInfo"], Set["HashInfo"]]:
      from dvc.cachemgr import LEGACY_HASH_NAMES
  
      legacy = set()
      default = set()
      for hi in hash_infos:
          if hi.name in LEGACY_HASH_NAMES:
              legacy.add(hi)
          else:
              default.add(hi)
      return legacy, default
  
imports: from typing import TYPE_CHECKING, Iterable, Optional, Set, Tuple
  from dvc.config import NoRemoteError, RemoteConfigError
  from dvc.log import logger
  from dvc.utils.objects import cached_property
  from dvc_data.hashfile.db import get_index
  from dvc_data.hashfile.transfer import TransferResult
label_desc: Use image node_id 1 for calling a global function with example usage: _split_legacy_hash_infos(hash_infos) and returns: legacy,  default