code: def enable_notebook(local=False, **kwargs):
      """Enable the automatic display of visualizations in the IPython Notebook.
  
      Parameters
      ----------
      local : boolean (optional, default=False)
          if True, then copy the d3 & LDAvis libraries to a location visible to
          the notebook server, and source them from there. See Notes below.
      **kwargs :
          all keyword parameters are passed through to :func:`prepared_data_to_html`
  
      Notes
      -----
      Known issues: using ``local=True`` may not work correctly in certain cases:
  
      - In IPython < 2.0, ``local=True`` may fail if the current working
        directory is changed within the notebook (e.g. with the %cd command).
      - In IPython 2.0+, ``local=True`` may fail if a url prefix is added
        (e.g. by setting NotebookApp.base_url).
  
      See Also
      --------
      :func:`disable_notebook` : undo the action of enable_notebook
      :func:`display` : embed visualization within the IPython notebook
      :func:`show` : launch a local server and show a visualization in a browser
      """
      try:
          from IPython.core.getipython import get_ipython
      except ImportError:
          raise ImportError("This feature requires IPython 1.0+")
  
      if local:
          if "ldavis_url" in kwargs or "d3_url" in kwargs:
              warnings.warn(
                  "enable_notebook: specified urls are ignored when local=True"
              )
          (
              kwargs["d3_url"],
              kwargs["ldavis_url"],
              kwargs["ldavis_css_url"],
          ) = write_ipynb_local_js()
  
      ip = get_ipython()
      formatter = ip.display_formatter.formatters["text/html"]
      formatter.for_type(
          PreparedData,
          lambda data, kwds=kwargs: prepared_data_to_html(data, **kwds),
      )
  
file_path: pyLDAvis/notebooks/pyLDAvis/_display.py
imports: import warnings
  import random
  import json
  import jinja2
  import re
  from pyLDAvis._server import serve
  from pyLDAvis.utils import get_id, write_ipynb_local_js, NumPyEncoder
  from pyLDAvis._prepare import PreparedData
  import pyLDAvis.urls
label_desc: Use image node_id 4 for calling a global function with example usage: enable_notebook(local) without return types