docstr: Formats a list of fields for display.
  
  Parameters
  ----------
  fields : list
    A list of 2-tuples: (field_title, field_content)
  title_width : int
    How many characters to pad titles to. Default to longest title.
code: def _format_fields(self, fields, title_width=0):
      """Formats a list of fields for display.
  
      Parameters
      ----------
      fields : list
        A list of 2-tuples: (field_title, field_content)
      title_width : int
        How many characters to pad titles to. Default to longest title.
      """
      out = []
      header = self.__head
      if title_width == 0:
          title_width = max(len(title) + 2 for title, _ in fields)
      for title, content in fields:
          if len(content.splitlines()) > 1:
              title = header(title + ":") + "\n"
          else:
              title = header((title + ":").ljust(title_width))
          out.append(cast_unicode(title) + cast_unicode(content))
      return "\n".join(out)
  
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 10 for calling the Inspector obj's underlying member method code with example usage: obj._format_fields(fields, title_width) and returns: str