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","."]
code: def target_info(cls, obj, ansi=False):
      if isinstance(obj, type):
          return ""
  
      targets = obj.traverse(cls.get_target)
      elements, containers = zip(*targets)
      element_set = {el for el in elements if el is not None}
      container_set = {c for c in containers if c is not None}
  
      element_info = None
      if len(element_set) == 1:
          element_info = f"Element: {next(iter(element_set))}"
      elif len(element_set) > 1:
          element_info = "Elements:\n   %s" % "\n   ".join(
              sorted(element_set)
          )
  
      container_info = None
      if len(container_set) == 1:
          container_info = f"Container: {next(iter(container_set))}"
      elif len(container_set) > 1:
          container_info = "Containers:\n   %s" % "\n   ".join(
              sorted(container_set)
          )
      heading = cls.heading(
          "Target Specifications", ansi=ansi, char="-"
      )
  
      target_header = (
          "\nTargets in this object available for customization:\n"
      )
      if element_info and container_info:
          target_info = f"{element_info}\n\n{container_info}"
      else:
          target_info = element_info if element_info else container_info
  
      target_footer = (
          "\nTo see the options info for one of these target specifications,"
          "\nwhich are of the form {type}[.{group}[.{label}]], do holoviews.help({type})."
      )
  
      return (
          f"{heading}\n{target_header}\n{target_info}\n{target_footer}"
      )
  
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 6 for calling the InfoPrinter obj's underlying member method code with example usage: obj.target_info(cls, obj, ansi) and returns: heading, str, target_header, str, target_info, str, target_footer, str