code: def _create_read_items(
      fqn: str, md: STORAGE_TYPES, obj: Any
  ) -> List[ReadItem]:
      if not isinstance(md, BytesStorageMetadata):
          if isinstance(obj, DTensor):
              local_chunks = [_create_chunk_from_dtensor(obj)]
          elif isinstance(obj, ShardedTensor):
              local_chunks = [
                  _chunk_for_shard(shard.metadata)
                  for shard in obj.local_shards()
              ]
          elif isinstance(obj, torch.Tensor):
              local_chunks = [_create_chunk_from_tensor(obj)]
          else:
              raise ValueError(
                  f"Invalid checkpoint metadata for {fqn}, "
                  + f"expected BytesStorageMetadata but found {type(md)}"
              )
          return create_read_items_for_chunk_list(fqn, md, local_chunks)
      else:
          return [
              _create_read_item_for_byteio(
                  dest_index=MetadataIndex(fqn),
                  dest_offset=0,
                  storage_index=MetadataIndex(fqn),
                  storage_offset=0,
                  length=0,
              )
          ]
  
imports: from typing import Any, cast, List
  import torch
  import torch.distributed
  from torch._utils import _get_device_module
  from torch.distributed._shard.metadata import ShardMetadata
  from torch.distributed._shard.sharded_tensor import ShardedTensor
  from torch.distributed._shard.sharded_tensor.metadata import TensorProperties
  from torch.distributed._tensor import DTensor
  from torch.distributed._tensor._utils import compute_local_shape_and_global_offset
  from torch.utils._pytree import tree_map_only
  from .metadata import BytesStorageMetadata, ChunkStorageMetadata, MetadataIndex, STATE_DICT_TYPE, STORAGE_TYPES, TensorStorageMetadata
  from .planner import LoadItemType, ReadItem, SavePlan, TensorWriteData, WriteItem, WriteItemType
  from .resharding import _check_shard_metadata_pair_overlap, _shards_get_overlap_region_wrt_saved_tensor
label_desc: Use image node_id 14 for calling a global function with example usage: _create_read_items(fqn, md, obj) and returns: create_read_items_for_chunk_list, list