class_docstr: A rich renderable that pretty prints an object.
  
  Args:
      _object (Any): An object to pretty print.
      highlighter (HighlighterType, optional): Highlighter object to apply to result, or None for ReprHighlighter. Defaults to None.
      indent_size (int, optional): Number of spaces in indent. Defaults to 4.
      justify (JustifyMethod, optional): Justify method, or None for default. Defaults to None.
      overflow (OverflowMethod, optional): Overflow method, or None for default. Defaults to None.
      no_wrap (Optional[bool], optional): Disable word wrapping. Defaults to False.
      indent_guides (bool, optional): Enable indentation guides. Defaults to False.
      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. Defaults to None.
      max_depth (int, optional): Maximum depth of nested data structures, or None for no maximum. Defaults to None.
      expand_all (bool, optional): Expand all containers. Defaults to False.
      margin (int, optional): Subtrace a margin from width to force containers to expand earlier. Defaults to 0.
      insert_line (bool, optional): Insert a new line if the output has multiple new lines. Defaults to False.
class_docstr_tok: ["A","rich","renderable","that","pretty","prints","an","object",".","Args",":","_object","(","Any",")",":","An","object","to","pretty","print",".","highlighter","(","HighlighterType",",","optional",")",":","Highlighter","object","to","apply","to","result",",","or","None","for","ReprHighlighter",".","Defaults","to","None",".","indent_size","(","int",",","optional",")",":","Number","of","spaces","in","indent",".","Defaults","to","4.","justify","(","JustifyMethod",",","optional",")",":","Justify","method",",","or","None","for","default",".","Defaults","to","None",".","overflow","(","OverflowMethod",",","optional",")",":","Overflow","method",",","or","None","for","default",".","Defaults","to","None",".","no_wrap","(","Optional","[","bool","]",",","optional",")",":","Disable","word","wrapping",".","Defaults","to","False",".","indent_guides","(","bool",",","optional",")",":","Enable","indentation","guides",".","Defaults","to","False",".","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",".","Defaults","to","None",".","max_depth","(","int",",","optional",")",":","Maximum","depth","of","nested","data","structures",",","or","None","for","no","maximum",".","Defaults","to","None",".","expand_all","(","bool",",","optional",")",":","Expand","all","containers",".","Defaults","to","False",".","margin","(","int",",","optional",")",":","Subtrace","a","margin","from","width","to","force","containers","to","expand","earlier",".","Defaults","to","0.","insert_line","(","bool",",","optional",")",":","Insert","a","new","line","if","the","output","has","multiple","new","lines",".","Defaults","to","False","."]
code: def __rich_measure__(
      self, console: "Console", options: "ConsoleOptions"
  ) -> "Measurement":
      pretty_str = pretty_repr(
          self._object,
          max_width=options.max_width,
          indent_size=self.indent_size,
          max_length=self.max_length,
          max_string=self.max_string,
          max_depth=self.max_depth,
          expand_all=self.expand_all,
      )
      text_width = (
          max(cell_len(line) for line in pretty_str.splitlines())
          if pretty_str
          else 0
      )
      return Measurement(text_width, text_width)
  
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 3 for calling the Pretty obj's underlying member method code with example usage: obj.__rich_measure__(console, options) and returns: Measurement