code: def display(data, local=False, **kwargs):
      """Display visualization in IPython notebook via the HTML display hook
  
      Parameters
      ----------
      data : PreparedData, created using :func:`prepare`
          The data for the visualization.
      local : boolean (optional, default=False)
          if True, then copy the d3 & mpld3 libraries to a location visible to
          the notebook server, and source them from there. See Notes below.
      **kwargs :
          additional keyword arguments are passed through to :func:`prepared_data_to_html`.
  
      Returns
      -------
      vis_d3 : IPython.display.HTML object
          the IPython HTML rich display of the visualization.
  
      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:`show` : launch a local server and show a visualization in a browser
      :func:`enable_notebook` : automatically embed visualizations in IPython notebook
      """
      # import here, in case users don't have requirements installed
      from IPython.display import HTML
  
      if local:
          if "ldavis_url" in kwargs or "d3_url" in kwargs:
              warnings.warn(
                  "display: specified urls are ignored when local=True"
              )
          (
              kwargs["d3_url"],
              kwargs["ldavis_url"],
              kwargs["ldavis_css_url"],
          ) = write_ipynb_local_js()
  
      return HTML(prepared_data_to_html(data, **kwargs))
  
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 2 for calling a global function with example usage: display(data, local) and returns: HTML