code: def _parse_batch_shape(
      batch: torch.Tensor,
  ) -> Union[TUnknown, List[int]]:
      if hasattr(batch, "shape"):
          return list(batch.shape)
  
      if isinstance(batch, (list, tuple)):
          shape = [_parse_batch_shape(el) for el in batch]
          return shape
  
      return _UNKNOWN_SIZE
  
imports: import copy
  import math
  import warnings
  from collections import defaultdict, deque
  from dataclasses import dataclass, field
  from enum import Enum
  from time import perf_counter
  from typing import Any, Callable, DefaultDict, Deque, Dict, List, MutableMapping, Optional, Tuple, Union
  import torch
  from torch.nn.parameter import UninitializedParameter
  from torch.utils._pytree import PyTree, tree_flatten
  from torch.utils.hooks import RemovableHandle
  from torchtnt.utils.version import is_torch_version_geq_1_13
  from typing_extensions import Literal
label_desc: Use image node_id 11 for calling a global function with example usage: _parse_batch_shape(batch) and returns: _UNKNOWN_SIZE, list, shape