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: Turn the supplied heading text into a suitable heading with
  optional underline and color.
docstr_tok: ["Turn","the","supplied","heading","text","into","a","suitable","heading","with","optional","underline","and","color","."]
code: def heading(cls, heading_text, char="=", level=0, ansi=False):
      """
      Turn the supplied heading text into a suitable heading with
      optional underline and color.
      """
      heading_color = cls.headings[level] if ansi else "%s"
      if char is None:
          return heading_color % f"{heading_text}\n"
      else:
          heading_ul = char * len(heading_text)
          return (
              heading_color
              % f"{heading_ul}\n{heading_text}\n{heading_ul}"
          )
  
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 2 for calling the InfoPrinter obj's underlying member method code with example usage: obj.heading(cls, heading_text, char, level, ansi) and returns: unknown, unknown