class_docstr: Class for controlling display and output settings.
class_docstr_tok: ["Class","for","controlling","display","and","output","settings","."]
code: def output(
      cls,
      line=None,
      cell=None,
      cell_runner=None,
      help_prompt=None,
      warnfn=None,
      **kwargs,
  ):
      if line and kwargs:
          raise ValueError(
              "Please either specify a string to "
              "parse or keyword arguments"
          )
      elif not Store.renderers:
          raise ValueError(
              "No plotting extension is currently loaded. "
              "Ensure you load an plotting extension with "
              "hv.extension or import it explicitly from "
              "holoviews.plotting before using hv.output."
          )
  
      # Make backup of previous options
      prev_backend = Store.current_backend
      if prev_backend in Store.renderers:
          prev_renderer = Store.renderers[prev_backend]
          prev_backend_spec = prev_backend + ":" + prev_renderer.mode
          prev_params = {
              k: v
              for k, v in prev_renderer.param.values().items()
              if k in cls.render_params
          }
      else:
          prev_renderer = None
          prev_backend_spec = prev_backend + ":default"
          prev_params = {}
      backend = prev_backend
  
      prev_restore = dict(OutputSettings.options)
      try:
          if line is not None:
              # Parse line
              line = line.split("#")[0].strip()
              kwargs = cls.extract_keywords(line, {})
  
          options = cls.get_options(kwargs, {}, warnfn)
  
          # Make backup of options on selected renderer
          if "backend" in options:
              backend_spec = options["backend"]
              if ":" not in backend_spec:
                  backend_spec += ":default"
          else:
              backend_spec = prev_backend_spec
          backend = backend_spec.split(":")[0]
          renderer = Store.renderers[backend]
          render_params = {
              k: v
              for k, v in renderer.param.values().items()
              if k in cls.render_params
          }
  
          # Set options on selected renderer and set display hook options
          OutputSettings.options = options
          cls._set_render_options(options, backend_spec)
      except Exception as e:
          # If setting options failed ensure they are reset
          OutputSettings.options = prev_restore
          cls.set_backend(prev_backend)
          if backend not in Store.renderers:
              raise ValueError(
                  f"The selected plotting extension {backend!r} "
                  "has not been loaded, ensure you load it "
                  f"with hv.extension({backend!r}) before using "
                  "hv.output."
              ) from e
          print(f"Error: {e}")
          if help_prompt:
              print(help_prompt)
          return
  
      if cell is not None:
          if cell_runner:
              cell_runner(cell, renderer)
          # After cell restore previous options and restore
          # temporarily selected renderer
          OutputSettings.options = prev_restore
          cls._set_render_options(render_params, backend_spec)
          if backend_spec.split(":")[0] != prev_backend:
              cls.set_backend(prev_backend)
              cls._set_render_options(prev_params, prev_backend_spec)
  
imports: from collections import defaultdict
  from ..core import Store
label_desc: Use image node_id 6 for calling the OutputSettings obj's underlying member method code with example usage: obj.output(cls, line, cell, cell_runner, help_prompt, warnfn) without return types