code: def pretty_repr(
      _object: Any,
      *,
      max_width: int = 80,
      indent_size: int = 4,
      max_length: Optional[int] = None,
      max_string: Optional[int] = None,
      max_depth: Optional[int] = None,
      expand_all: bool = False,
  ) -> str:
      """Prettify repr string by expanding on to new lines to fit within a given width.
  
      Args:
          _object (Any): Object to repr.
          max_width (int, optional): Desired maximum width of repr string. Defaults to 80.
          indent_size (int, optional): Number of spaces to indent. Defaults to 4.
          max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
              Defaults to None.
          max_string (int, optional): Maximum length of string before truncating, or None to disable truncating.
              Defaults to None.
          max_depth (int, optional): Maximum depth of nested data structure, or None for no depth.
              Defaults to None.
          expand_all (bool, optional): Expand all containers regardless of available width. Defaults to False.
  
      Returns:
          str: A possibly multi-line representation of the object.
      """
  
      if _safe_isinstance(_object, Node):
          node = _object
      else:
          node = traverse(
              _object,
              max_length=max_length,
              max_string=max_string,
              max_depth=max_depth,
          )
      repr_str: str = node.render(
          max_width=max_width,
          indent_size=indent_size,
          expand_all=expand_all,
      )
      return repr_str
  
imports: import builtins
  import collections
  import dataclasses
  import inspect
  import os
  import sys
  from array import array
  from collections import Counter, UserDict, UserList, defaultdict, deque
  from dataclasses import dataclass, fields, is_dataclass
  from inspect import isclass
  from itertools import islice
  from types import MappingProxyType
  from typing import TYPE_CHECKING, Any, Callable, DefaultDict, Dict, Iterable, List, Optional, Sequence, Set, Tuple, Union
  from rich.repr import RichReprResult
  from .None import get_console
  from ._loop import loop_last
  from ._pick import pick_bool
  from .abc import RichRenderable
  from .cells import cell_len
  from .highlighter import ReprHighlighter
  from .jupyter import JupyterMixin, JupyterRenderable
  from .measure import Measurement
  from .text import Text
label_desc: Use image node_id 13 for calling a global function with example usage: pretty_repr(_object) and returns: repr_str