class_docstr: Class for printing other information related to an object that is
  of use to the user.
class_docstr_tok: ["Class","for","printing","other","information","related","to","an","object","that","is","of","use","to","the","user","."]
docstr: Show information about an object in the given category. ANSI
  color codes may be enabled or disabled.
docstr_tok: ["Show","information","about","an","object","in","the","given","category",".","ANSI","color","codes","may","be","enabled","or","disabled","."]
code: def info(
      cls,
      obj,
      ansi=False,
      backend="matplotlib",
      visualization=True,
      pattern=None,
      elements=None,
  ):
      """
      Show information about an object in the given category. ANSI
      color codes may be enabled or disabled.
      """
      if elements is None:
          elements = []
      cls.elements = elements
      ansi_escape = re.compile(r"\x1b[^m]*m")
  
      isclass = isinstance(obj, type)
      name = obj.__name__ if isclass else obj.__class__.__name__
      backend_registry = cls.store.registry.get(backend, {})
      plot_class = backend_registry.get(
          obj if isclass else type(obj), None
      )
      # Special case to handle PlotSelectors
      if hasattr(plot_class, "plot_classes"):
          plot_class = next(iter(plot_class.plot_classes.values()))
  
      if visualization is False or plot_class is None:
          if pattern is not None:
              obj = ParamFilter(obj, ParamFilter.regexp_filter(pattern))
              if len(list(obj.param)) <= 1:
                  return f"No {name!r} parameters found matching specified pattern {pattern!r}"
          info = param.ipython.ParamPager()(obj)
          if ansi is False:
              info = ansi_escape.sub("", info)
          return cls.highlight(pattern, info)
  
      heading = name if isclass else f"{name}: {obj.group} {obj.label}"
      prefix = heading
      lines = [
          prefix,
          cls.object_info(obj, name, backend=backend, ansi=ansi),
      ]
  
      if not isclass:
          lines += ["", cls.target_info(obj, ansi=ansi)]
      if plot_class is not None:
          lines += [
              "",
              cls.options_info(plot_class, ansi, pattern=pattern),
          ]
      return "\n".join(lines)
  
imports: import re
  import textwrap
  import param
  from param.ipython import ParamPager
  from param.parameterized import bothmethod
  from .util import group_sanitizer, label_sanitizer
label_desc: Use image node_id 4 for calling the InfoPrinter obj's underlying member method code with example usage: obj.info(cls, obj, ansi, backend, visualization, pattern, elements) and returns: str, cls, str, name, str, pattern