code: def summarize(obj: Any) -> Any:
      """Return a pretty-formatted string for an object.
  
      This has special handling for pretty-formatting of commonly used data types
      in RLlib, such as SampleBatch, numpy arrays, etc.
  
      Args:
          obj: The object to format.
  
      Returns:
          The summarized object.
      """
  
      return _printer.pformat(_summarize(obj))
  
file_path: ray/rllib/utils/debug/summary.py
imports: import numpy
  import pprint
  from typing import Any, Mapping
  from ray.rllib.policy.sample_batch import SampleBatch, MultiAgentBatch
  from ray.rllib.utils.annotations import DeveloperAPI
label_desc: Use image node_id 1 for calling a global function with example usage: summarize(obj) and returns: _printer