class_docstr: Notebook specific extension to hv.extension that offers options for
  controlling the notebook environment.
code: def __call__(self, *args, **params):
      comms = params.pop("comms", None)
      super().__call__(*args, **params)
      # Abort if IPython not found
      try:
          ip = (
              params.pop("ip", None) or get_ipython()
          )  # noqa (get_ipython)
      except Exception:
          return
  
      # Notebook archive relies on display hooks being set to work.
      try:
          import nbformat  # noqa: F401
  
          try:
              from .archive import notebook_archive
  
              hv.archive = notebook_archive
          except AttributeError as e:
              if (
                  str(e)
                  != "module 'tornado.web' has no attribute 'asynchronous'"
              ):
                  raise
  
      except ImportError:
          pass
  
      # Not quite right, should be set when switching backends
      if (
          "matplotlib" in Store.renderers
          and not notebook_extension._loaded
      ):
          svg_exporter = Store.renderers["matplotlib"].instance(
              holomap=None, fig="svg"
          )
          hv.archive.exporters = [svg_exporter] + hv.archive.exporters
  
      p = param.ParamOverrides(
          self, {k: v for k, v in params.items() if k != "config"}
      )
      if p.case_sensitive_completion:
          from IPython.core import completer
  
          completer.completions_sorting_key = (
              self.completions_sorting_key
          )
      if not p.allow_jedi_completion and hasattr(
          IPCompleter, "use_jedi"
      ):
          ip.run_line_magic("config", "IPCompleter.use_jedi = False")
  
      resources = self._get_resources(args, params)
  
      Store.display_formats = p.display_formats
      if "html" not in p.display_formats and len(p.display_formats) > 1:
          msg = (
              "Output magic unable to control displayed format "
              "as IPython notebook uses fixed precedence "
              "between %r" % p.display_formats
          )
          display(HTML(f"<b>Warning</b>: {msg}"))
  
      loaded = notebook_extension._loaded
      if loaded == False:
          param_ext.load_ipython_extension(ip, verbose=False)
          load_magics(ip)
          Store.output_settings.initialize(list(Store.renderers.keys()))
          Store.set_display_hook(
              "html+js", LabelledData, pprint_display
          )
          Store.set_display_hook("png", LabelledData, png_display)
          Store.set_display_hook("svg", LabelledData, svg_display)
          notebook_extension._loaded = True
  
      css = ""
      if p.width is not None:
          css += (
              "<style>div.container { width: %s%% }</style>" % p.width
          )
      if p.css:
          css += f"<style>{p.css}</style>"
  
      if css:
          display(HTML(css))
  
      resources = list(resources)
      if len(resources) == 0:
          return
  
      from panel import config, extension as panel_extension
  
      if hasattr(config, "comms") and comms:
          config.comms = comms
  
      same_cell_execution = published = getattr(
          self, "_repeat_execution_in_cell", False
      )
      for r in [r for r in resources if r != "holoviews"]:
          Store.renderers[r].load_nb(inline=p.inline)
      Renderer.load_nb(
          inline=p.inline,
          reloading=same_cell_execution,
          enable_mathjax=p.enable_mathjax,
      )
  
      if not published and hasattr(panel_extension, "_display_globals"):
          panel_extension._display_globals()
  
      if hasattr(ip, "kernel") and not loaded:
          Renderer.comm_manager.get_client_comm(
              notebook_extension._process_comm_msg, "hv-extension-comm"
          )
  
      # Create a message for the logo (if shown)
      if not same_cell_execution and p.logo:
          self.load_logo(
              logo=p.logo,
              bokeh_logo=p.logo and ("bokeh" in resources),
              mpl_logo=p.logo
              and (
                  ("matplotlib" in resources)
                  or resources == ["holoviews"]
              ),
              plotly_logo=p.logo and ("plotly" in resources),
          )
  
imports: import os
  from unittest import SkipTest
  import param
  from IPython.core.completer import IPCompleter
  from IPython.display import HTML, publish_display_data
  from param import ipython
  import holoviews
  from ..core.dimension import LabelledData
  from ..core.options import Store
  from ..core.tree import AttrTree
  from ..element.comparison import ComparisonTestCase
  from ..plotting.renderer import Renderer
  from ..util import extension
  from .display_hooks import display, png_display, pprint_display, svg_display
  from .magics import load_magics
label_desc: Use image node_id 1 for calling the notebook_extension obj's underlying member method code with example usage: obj.__call__() without return types