docstr: Retrieve an info dict and format it.
code: def _get_info(
      self, obj, oname="", formatter=None, info=None, detail_level=0
  ):
      """Retrieve an info dict and format it."""
  
      info = self._info(
          obj, oname=oname, info=info, detail_level=detail_level
      )
  
      _mime = {
          "text/plain": [],
          "text/html": "",
      }
  
      def append_field(bundle, title, key, formatter=None):
          field = info[key]
          if field is not None:
              formatted_field = self._mime_format(field, formatter)
              bundle["text/plain"].append(
                  (title, formatted_field["text/plain"])
              )
              bundle["text/html"] += (
                  "<h1>"
                  + title
                  + "</h1>\n"
                  + formatted_field["text/html"]
                  + "\n"
              )
  
      def code_formatter(text):
          return {
              "text/plain": self.format(text),
              "text/html": pylight(text),
          }
  
      if info["isalias"]:
          append_field(_mime, "Repr", "string_form")
  
      elif info["ismagic"]:
          if detail_level > 0:
              append_field(_mime, "Source", "source", code_formatter)
          else:
              append_field(_mime, "Docstring", "docstring", formatter)
          append_field(_mime, "File", "file")
  
      elif info["isclass"] or is_simple_callable(obj):
          # Functions, methods, classes
          append_field(_mime, "Signature", "definition", code_formatter)
          append_field(
              _mime, "Init signature", "init_definition", code_formatter
          )
          if detail_level > 0 and info["source"]:
              append_field(_mime, "Source", "source", code_formatter)
          else:
              append_field(_mime, "Docstring", "docstring", formatter)
              append_field(
                  _mime, "Init docstring", "init_docstring", formatter
              )
  
          append_field(_mime, "File", "file")
          append_field(_mime, "Type", "type_name")
  
      else:
          # General Python objects
          append_field(_mime, "Signature", "definition", code_formatter)
          append_field(
              _mime, "Call signature", "call_def", code_formatter
          )
  
          append_field(_mime, "Type", "type_name")
  
          # Base class for old-style instances
          if (
              (not py3compat.PY3)
              and isinstance(obj, types.InstanceType)
              and info["base_class"]
          ):
              append_field(_mime, "Base Class", "base_class")
  
          append_field(_mime, "String form", "string_form")
  
          # Namespace
          if info["namespace"] != "Interactive":
              append_field(_mime, "Namespace", "namespace")
  
          append_field(_mime, "Length", "length")
          append_field(_mime, "File", "file")
  
          # Source or docstring, depending on detail level and whether
          # source found.
          if detail_level > 0:
              append_field(_mime, "Source", "source", code_formatter)
          else:
              append_field(_mime, "Docstring", "docstring", formatter)
  
          append_field(
              _mime, "Class docstring", "class_docstring", formatter
          )
          append_field(
              _mime, "Init docstring", "init_docstring", formatter
          )
          append_field(
              _mime, "Call docstring", "call_docstring", formatter
          )
  
      return self.format_mime(_mime)
  
imports: from __future__ import print_function
  import inspect
  import linecache
  import warnings
  import os
  from textwrap import dedent
  import types
  import io
  from IPython.core import page
  from IPython.lib.pretty import pretty
  from IPython.testing.skipdoctest import skip_doctest_py3
  from IPython.utils import PyColorize
  from IPython.utils import openpy
  from IPython.utils import py3compat
  from IPython.utils.dir2 import safe_hasattr
  from IPython.utils.path import compress_user
  from IPython.utils.text import indent
  from IPython.utils.wildcard import list_namespace
  from IPython.utils.coloransi import TermColors, ColorScheme, ColorSchemeTable
  from IPython.utils.py3compat import cast_unicode, string_types, PY3
  from IPython.utils.signatures import signature
  from IPython.utils.colorable import Colorable
  from pygments import highlight
  from pygments.formatters import HtmlFormatter
label_desc: Use image node_id 13 for calling the Inspector obj's underlying member method code with example usage: obj._get_info(obj, oname, formatter, info, detail_level) and returns: self, dict