code: def preserve(
      explanation, selector_key=None, file_name=None, **kwargs
  ):
      """Preserves an explanation's visualization for Jupyter cell, or file.
  
      If file_name is not None the following occurs:
      - For Plotly figures, saves to HTML using `plot`.
      - For dataframes, saves to HTML using `to_html`.
      - For strings (html), saves to HTML.
      - For Dash components, fails with exception. This is currently not supported.
  
      Args:
          explanation: An explanation.
          selector_key: If integer, treat as index for explanation. Otherwise, looks up value in first column, gets index.
          file_name: If assigned, will save the visualization to this filename.
          **kwargs: Kwargs which are passed to the underlying render/export call.
      """
      if _current_module._preserve_provider is None:
          _current_module._preserve_provider = PreserveProvider()
  
      try:
          # Get explanation key
          key = _get_integer_key(selector_key, explanation)
  
          _current_module._preserve_provider.render(
              explanation, key=key, file_name=file_name, **kwargs
          )
          return None
      except Exception as e:  # pragma: no cover
          _log.error(e, exc_info=True)
          raise e
  
file_path: interpret/python/interpret-core/interpret/visual/_interactive.py
imports: import sys
  import logging
  from ..provider import AutoVisualizeProvider, PreserveProvider, DashProvider
label_desc: Use image node_id 11 for calling a global function with example usage: preserve(explanation, selector_key, file_name) and returns: None