code: def _load_storage_from_out(storage_map, key, out):
      from dvc.cachemgr import LEGACY_HASH_NAMES
      from dvc.config import NoRemoteError
      from dvc_data.index import FileStorage, ObjectStorage
  
      storage_map.add_cache(ObjectStorage(key, out.cache))
      try:
          remote = out.repo.cloud.get_remote(out.remote)
          if remote.fs.version_aware:
              storage_map.add_remote(
                  FileStorage(
                      key=key,
                      fs=remote.fs,
                      path=remote.path,
                      index=remote.index,
                      prefix=(),
                      read_only=(not out.can_push),
                  )
              )
          else:
              odb = (
                  remote.legacy_odb
                  if out.hash_name in LEGACY_HASH_NAMES
                  else remote.odb
              )
              storage_map.add_remote(
                  ObjectStorage(
                      key,
                      odb,
                      index=remote.index,
                      read_only=(not out.can_push),
                  )
              )
      except NoRemoteError:
          pass
  
      if out.stage.is_import:
          _load_storage_from_import(storage_map, key, out)
  
imports: import logging
  import time
  from collections import defaultdict
  from functools import partial
  from itertools import chain
  from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, Iterator, List, NamedTuple, Optional, Set, Tuple, Union
  from funcy.debug import format_time
  from dvc.dependency import ParamsDependency
  from dvc.fs import LocalFileSystem
  from dvc.fs.callbacks import DEFAULT_CALLBACK
  from dvc.log import logger
  from dvc.utils.objects import cached_property
label_desc: Use image node_id 6 for calling a global function with example usage: _load_storage_from_out(storage_map, key, out) without return types