code: def _get_example_shape(example: Union[Sequence, Any]):
      """Get the shape of an object if applicable."""
      shape = []
      if not isinstance(example, str) and hasattr(example, "__len__"):
          length = len(example)
          shape = [length]
          if length > 0:
              shape += _get_example_shape(example[0])
      return shape
  
file_path: wandb/wandb/sdk/integration_utils/data_logging.py
imports: import sys
  from collections.abc import Sequence
  from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union
  import wandb
label_desc: Use image node_id 2 for calling a global function with example usage: _get_example_shape(example) and returns: shape