code: def get_tensor_sizes(
      data: Union[Dict, Tensor]
  ) -> Union[List[str], List[Tuple[int]]]:
      """Utility function for extracting tensor shapes (for printing purposes only)."""
      if isinstance(data, Dict):
          tensor_sizes = []
          for k, v in data.items():
              size_ = get_tensor_sizes(v)
              if size_:
                  tensor_sizes.append(f"{k}: {size_}")
          return tensor_sizes
      elif isinstance(data, Tensor):
          return [*data.shape]
      else:
          return []
  
file_path: ml-cvnets/cvnets/misc/common.py
imports: import argparse
  import os
  import re
  from types import MethodType
  from typing import Dict, List, Optional, Tuple, Union
  import torch
  from torch import Tensor
  from utils import logger
  from utils.common_utils import unwrap_model_fn
  from utils.ddp_utils import is_master, is_start_rank_node
label_desc: Use image node_id 6 for calling a global function with example usage: get_tensor_sizes(data) and returns: tensor_sizes, list, list