We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
unicode `__javascript__` external resources breaks output notebook in python 2
Defining `__javascript__` using a list of unicode strings, causes a Javascript error upon calling `output_notebook`:

```
from __future__ import unicode_literals, print_function
import sys
print(sys.version)

from bokeh.models import Model
from bokeh.io import output_notebook

class TestCustom(Model):
    __javascript__ = ["https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js",
                      "https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.1.4/js/ion.rangeSlider.js"]

    __implementation__ = """
    p = require "core/properties"
    BokehModel = require "model"

    class TestCustom extends BokehModel
        type: "TestCustom"

    module.exports = 
        Model: TestCustom
    
    """

output_notebook()
```

The cell output is:
```
2.7.12 |Anaconda 4.2.0 (x86_64)| (default, Jul  2 2016, 17:43:17) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)]
Loading BokehJS ...
Javascript error adding output!
SyntaxError: Unexpected string
See your browser Javascript console for more details.
```

And the console error message is:
```
SyntaxError: Unexpected string
    at OutputArea.append_javascript (outputarea.js:625)
    at OutputArea.append_mime_type (outputarea.js:569)
    at OutputArea.append_display_data (outputarea.js:533)
    at OutputArea.append_output (outputarea.js:319)
    at OutputArea.handle_output (outputarea.js:233)
    at output (codecell.js:356)
    at Kernel._handle_output_message (kernel.js:1060)
    at i (jquery.min.js:4)
    at Kernel._handle_iopub_message (kernel.js:1087)
    at Kernel._finish_ws_message (kernel.js:924)
```

* The Javascript error goes away using a byte string `b"https://cdnjs.cloudflare.com..."`, but then the same error pops up in Python 3.
* The error only happens with `__javascript__` not `__css__`.

Bokeh version: 0.12.3
Jupyter version: 1.0.0
Notebook version: 4.2.3

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `bokeh/core/templates.py`
Content:
```
1 ''' The templates module contains Jinja2 templates used by Bokeh embed
2 Bokeh models (e.g. plots, widgets, layouts) in various ways.
3 
4 .. bokeh-jinja:: bokeh.core.templates.AUTOLOAD_JS
5 .. bokeh-jinja:: bokeh.core.templates.AUTOLOAD_NB_JS
6 .. bokeh-jinja:: bokeh.core.templates.AUTOLOAD_TAG
7 .. bokeh-jinja:: bokeh.core.templates.CSS_RESOURCES
8 .. bokeh-jinja:: bokeh.core.templates.DOC_JS
9 .. bokeh-jinja:: bokeh.core.templates.FILE
10 .. bokeh-jinja:: bokeh.core.templates.JS_RESOURCES
11 .. bokeh-jinja:: bokeh.core.templates.NOTEBOOK_LOAD
12 .. bokeh-jinja:: bokeh.core.templates.NOTEBOOK_DIV
13 .. bokeh-jinja:: bokeh.core.templates.PLOT_DIV
14 .. bokeh-jinja:: bokeh.core.templates.SCRIPT_TAG
15 
16 '''
17 from __future__ import absolute_import
18 
19 from jinja2 import Environment, PackageLoader
20 
21 _env = Environment(loader=PackageLoader('bokeh.core', '_templates'))
22 
23 JS_RESOURCES = _env.get_template("js_resources.html")
24 CSS_RESOURCES = _env.get_template("css_resources.html")
25 
26 SCRIPT_TAG = _env.get_template("script_tag.html")
27 
28 PLOT_DIV = _env.get_template("plot_div.html")
29 
30 DOC_JS = _env.get_template("doc_js.js")
31 
32 FILE = _env.get_template("file.html")
33 
34 NOTEBOOK_LOAD = _env.get_template("notebook_load.html")
35 NOTEBOOK_DIV = _env.get_template("notebook_div.html")
36 
37 AUTOLOAD_JS = _env.get_template("autoload_js.js")
38 AUTOLOAD_NB_JS = _env.get_template("autoload_nb_js.js")
39 AUTOLOAD_TAG = _env.get_template("autoload_tag.html")
40
```

Path: `bokeh/util/notebook.py`
Content:
```
1 ''' Functions useful for loading Bokeh code and data in IPython notebooks.
2 
3 '''
4 from __future__ import absolute_import
5 
6 _notebook_loaded = None
7 
8 def load_notebook(resources=None, verbose=False, hide_banner=False, load_timeout=5000):
9     ''' Prepare the IPython notebook for displaying Bokeh plots.
10 
11     Args:
12         resources (Resource, optional) :
13             how and where to load BokehJS from (default: CDN)
14 
15         verbose (bool, optional) :
16             whether to report detailed settings (default: False)
17 
18         hide_banner (bool, optional):
19             whether to hide the Bokeh banner (default: False)
20 
21         load_timeout (int, optional) :
22             Timeout in milliseconds when plots assume load timed out (default: 5000)
23 
24     .. warning::
25         Clearing the output cell containing the published BokehJS
26         resources HTML code may cause Bokeh CSS styling to be removed.
27 
28     Returns:
29         None
30 
31     '''
32     html, js = _load_notebook_html(resources, verbose, hide_banner, load_timeout)
33     publish_display_data({'text/html': html})
34     publish_display_data({'application/javascript': js})
35 
36 FINALIZE_JS = """
37 document.getElementById("%s").textContent = "BokehJS is loading...";
38 """
39 
40 def _load_notebook_html(resources=None, verbose=False, hide_banner=False,
41                         load_timeout=5000):
42     global _notebook_loaded
43 
44     from .. import __version__
45     from ..core.templates import AUTOLOAD_NB_JS, NOTEBOOK_LOAD
46     from ..util.serialization import make_id
47     from ..resources import CDN
48 
49     if resources is None:
50         resources = CDN
51 
52     if resources.mode == 'inline':
53         js_info = 'inline'
54         css_info = 'inline'
55     else:
56         js_info = resources.js_files[0] if len(resources.js_files) == 1 else resources.js_files
57         css_info = resources.css_files[0] if len(resources.css_files) == 1 else resources.css_files
58 
59     warnings = ["Warning: " + msg['text'] for msg in resources.messages if msg['type'] == 'warn']
60 
61     if _notebook_loaded and verbose:
62         warnings.append('Warning: BokehJS previously loaded')
63 
64     _notebook_loaded = resources
65 
66     element_id = make_id()
67 
68     html = NOTEBOOK_LOAD.render(
69         element_id    = element_id,
70         verbose       = verbose,
71         js_info       = js_info,
72         css_info      = css_info,
73         bokeh_version = __version__,
74         warnings      = warnings,
75         hide_banner   = hide_banner,
76     )
77 
78     js = AUTOLOAD_NB_JS.render(
79         elementid = '' if hide_banner else element_id,
80         js_urls  = resources.js_files,
81         css_urls = resources.css_files,
82         js_raw   = resources.js_raw + ([] if hide_banner else [FINALIZE_JS % element_id]),
83         css_raw  = resources.css_raw_str,
84         force    = 1,
85         timeout  = load_timeout
86     )
87 
88     return html, js
89 
90 def publish_display_data(data, source='bokeh'):
91     ''' Compatibility wrapper for IPython ``publish_display_data``
92 
93     Later versions of IPython remove the ``source`` (first) argument. This
94     function insulates Bokeh library code from this change.
95 
96     Args:
97         source (str, optional) : the source arg for IPython (default: "bokeh")
98         data (dict) : the data dict to pass to ``publish_display_data``
99             Typically has the form ``{'text/html': html}``
100 
101     '''
102     import IPython.core.displaypub as displaypub
103     try:
104         displaypub.publish_display_data(source, data)
105     except TypeError:
106         displaypub.publish_display_data(data)
107 
108 def get_comms(target_name):
109     ''' Create a Jupyter comms object for a specific target, that can
110     be used to update Bokeh documents in the notebook.
111 
112     Args:
113         target_name (str) : the target name the Comms object should connect to
114 
115     Returns
116         Jupyter Comms
117 
118     '''
119     from ipykernel.comm import Comm
120     return Comm(target_name=target_name, data={})
121
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/bokeh/core/templates.py b/bokeh/core/templates.py
--- a/bokeh/core/templates.py
+++ b/bokeh/core/templates.py
@@ -16,9 +16,12 @@
 '''
 from __future__ import absolute_import
 
-from jinja2 import Environment, PackageLoader
+import json
+
+from jinja2 import Environment, PackageLoader, Markup
 
 _env = Environment(loader=PackageLoader('bokeh.core', '_templates'))
+_env.filters['json'] = lambda obj: Markup(json.dumps(obj))
 
 JS_RESOURCES = _env.get_template("js_resources.html")
 CSS_RESOURCES = _env.get_template("css_resources.html")
diff --git a/bokeh/util/notebook.py b/bokeh/util/notebook.py
--- a/bokeh/util/notebook.py
+++ b/bokeh/util/notebook.py
@@ -81,7 +81,7 @@
         css_urls = resources.css_files,
         js_raw   = resources.js_raw + ([] if hide_banner else [FINALIZE_JS % element_id]),
         css_raw  = resources.css_raw_str,
-        force    = 1,
+        force    = True,
         timeout  = load_timeout
     )

{"golden_diff": "diff --git a/bokeh/core/templates.py b/bokeh/core/templates.py\n--- a/bokeh/core/templates.py\n+++ b/bokeh/core/templates.py\n@@ -16,9 +16,12 @@\n '''\n from __future__ import absolute_import\n \n-from jinja2 import Environment, PackageLoader\n+import json\n+\n+from jinja2 import Environment, PackageLoader, Markup\n \n _env = Environment(loader=PackageLoader('bokeh.core', '_templates'))\n+_env.filters['json'] = lambda obj: Markup(json.dumps(obj))\n \n JS_RESOURCES = _env.get_template(\"js_resources.html\")\n CSS_RESOURCES = _env.get_template(\"css_resources.html\")\ndiff --git a/bokeh/util/notebook.py b/bokeh/util/notebook.py\n--- a/bokeh/util/notebook.py\n+++ b/bokeh/util/notebook.py\n@@ -81,7 +81,7 @@\n         css_urls = resources.css_files,\n         js_raw   = resources.js_raw + ([] if hide_banner else [FINALIZE_JS % element_id]),\n         css_raw  = resources.css_raw_str,\n-        force    = 1,\n+        force    = True,\n         timeout  = load_timeout\n     )\n", "issue": "unicode `__javascript__` external resources breaks output notebook in python 2\nDefining `__javascript__` using a list of unicode strings, causes a Javascript error upon calling `output_notebook`:\r\n\r\n```\r\nfrom __future__ import unicode_literals, print_function\r\nimport sys\r\nprint(sys.version)\r\n\r\nfrom bokeh.models import Model\r\nfrom bokeh.io import output_notebook\r\n\r\nclass TestCustom(Model):\r\n    __javascript__ = [\"https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js\",\r\n                      \"https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.1.4/js/ion.rangeSlider.js\"]\r\n\r\n    __implementation__ = \"\"\"\r\n    p = require \"core/properties\"\r\n    BokehModel = require \"model\"\r\n\r\n    class TestCustom extends BokehModel\r\n        type: \"TestCustom\"\r\n\r\n    module.exports = \r\n        Model: TestCustom\r\n    \r\n    \"\"\"\r\n\r\noutput_notebook()\r\n```\r\n\r\nThe cell output is:\r\n```\r\n2.7.12 |Anaconda 4.2.0 (x86_64)| (default, Jul  2 2016, 17:43:17) \r\n[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)]\r\nLoading BokehJS ...\r\nJavascript error adding output!\r\nSyntaxError: Unexpected string\r\nSee your browser Javascript console for more details.\r\n```\r\n\r\nAnd the console error message is:\r\n```\r\nSyntaxError: Unexpected string\r\n    at OutputArea.append_javascript (outputarea.js:625)\r\n    at OutputArea.append_mime_type (outputarea.js:569)\r\n    at OutputArea.append_display_data (outputarea.js:533)\r\n    at OutputArea.append_output (outputarea.js:319)\r\n    at OutputArea.handle_output (outputarea.js:233)\r\n    at output (codecell.js:356)\r\n    at Kernel._handle_output_message (kernel.js:1060)\r\n    at i (jquery.min.js:4)\r\n    at Kernel._handle_iopub_message (kernel.js:1087)\r\n    at Kernel._finish_ws_message (kernel.js:924)\r\n```\r\n\r\n* The Javascript error goes away using a byte string `b\"https://cdnjs.cloudflare.com...\"`, but then the same error pops up in Python 3.\r\n* The error only happens with `__javascript__` not `__css__`.\r\n\r\nBokeh version: 0.12.3\r\nJupyter version: 1.0.0\r\nNotebook version: 4.2.3\n", "before_files": [{"content": "''' The templates module contains Jinja2 templates used by Bokeh embed\nBokeh models (e.g. plots, widgets, layouts) in various ways.\n\n.. bokeh-jinja:: bokeh.core.templates.AUTOLOAD_JS\n.. bokeh-jinja:: bokeh.core.templates.AUTOLOAD_NB_JS\n.. bokeh-jinja:: bokeh.core.templates.AUTOLOAD_TAG\n.. bokeh-jinja:: bokeh.core.templates.CSS_RESOURCES\n.. bokeh-jinja:: bokeh.core.templates.DOC_JS\n.. bokeh-jinja:: bokeh.core.templates.FILE\n.. bokeh-jinja:: bokeh.core.templates.JS_RESOURCES\n.. bokeh-jinja:: bokeh.core.templates.NOTEBOOK_LOAD\n.. bokeh-jinja:: bokeh.core.templates.NOTEBOOK_DIV\n.. bokeh-jinja:: bokeh.core.templates.PLOT_DIV\n.. bokeh-jinja:: bokeh.core.templates.SCRIPT_TAG\n\n'''\nfrom __future__ import absolute_import\n\nfrom jinja2 import Environment, PackageLoader\n\n_env = Environment(loader=PackageLoader('bokeh.core', '_templates'))\n\nJS_RESOURCES = _env.get_template(\"js_resources.html\")\nCSS_RESOURCES = _env.get_template(\"css_resources.html\")\n\nSCRIPT_TAG = _env.get_template(\"script_tag.html\")\n\nPLOT_DIV = _env.get_template(\"plot_div.html\")\n\nDOC_JS = _env.get_template(\"doc_js.js\")\n\nFILE = _env.get_template(\"file.html\")\n\nNOTEBOOK_LOAD = _env.get_template(\"notebook_load.html\")\nNOTEBOOK_DIV = _env.get_template(\"notebook_div.html\")\n\nAUTOLOAD_JS = _env.get_template(\"autoload_js.js\")\nAUTOLOAD_NB_JS = _env.get_template(\"autoload_nb_js.js\")\nAUTOLOAD_TAG = _env.get_template(\"autoload_tag.html\")\n", "path": "bokeh/core/templates.py"}, {"content": "''' Functions useful for loading Bokeh code and data in IPython notebooks.\n\n'''\nfrom __future__ import absolute_import\n\n_notebook_loaded = None\n\ndef load_notebook(resources=None, verbose=False, hide_banner=False, load_timeout=5000):\n    ''' Prepare the IPython notebook for displaying Bokeh plots.\n\n    Args:\n        resources (Resource, optional) :\n            how and where to load BokehJS from (default: CDN)\n\n        verbose (bool, optional) :\n            whether to report detailed settings (default: False)\n\n        hide_banner (bool, optional):\n            whether to hide the Bokeh banner (default: False)\n\n        load_timeout (int, optional) :\n            Timeout in milliseconds when plots assume load timed out (default: 5000)\n\n    .. warning::\n        Clearing the output cell containing the published BokehJS\n        resources HTML code may cause Bokeh CSS styling to be removed.\n\n    Returns:\n        None\n\n    '''\n    html, js = _load_notebook_html(resources, verbose, hide_banner, load_timeout)\n    publish_display_data({'text/html': html})\n    publish_display_data({'application/javascript': js})\n\nFINALIZE_JS = \"\"\"\ndocument.getElementById(\"%s\").textContent = \"BokehJS is loading...\";\n\"\"\"\n\ndef _load_notebook_html(resources=None, verbose=False, hide_banner=False,\n                        load_timeout=5000):\n    global _notebook_loaded\n\n    from .. import __version__\n    from ..core.templates import AUTOLOAD_NB_JS, NOTEBOOK_LOAD\n    from ..util.serialization import make_id\n    from ..resources import CDN\n\n    if resources is None:\n        resources = CDN\n\n    if resources.mode == 'inline':\n        js_info = 'inline'\n        css_info = 'inline'\n    else:\n        js_info = resources.js_files[0] if len(resources.js_files) == 1 else resources.js_files\n        css_info = resources.css_files[0] if len(resources.css_files) == 1 else resources.css_files\n\n    warnings = [\"Warning: \" + msg['text'] for msg in resources.messages if msg['type'] == 'warn']\n\n    if _notebook_loaded and verbose:\n        warnings.append('Warning: BokehJS previously loaded')\n\n    _notebook_loaded = resources\n\n    element_id = make_id()\n\n    html = NOTEBOOK_LOAD.render(\n        element_id    = element_id,\n        verbose       = verbose,\n        js_info       = js_info,\n        css_info      = css_info,\n        bokeh_version = __version__,\n        warnings      = warnings,\n        hide_banner   = hide_banner,\n    )\n\n    js = AUTOLOAD_NB_JS.render(\n        elementid = '' if hide_banner else element_id,\n        js_urls  = resources.js_files,\n        css_urls = resources.css_files,\n        js_raw   = resources.js_raw + ([] if hide_banner else [FINALIZE_JS % element_id]),\n        css_raw  = resources.css_raw_str,\n        force    = 1,\n        timeout  = load_timeout\n    )\n\n    return html, js\n\ndef publish_display_data(data, source='bokeh'):\n    ''' Compatibility wrapper for IPython ``publish_display_data``\n\n    Later versions of IPython remove the ``source`` (first) argument. This\n    function insulates Bokeh library code from this change.\n\n    Args:\n        source (str, optional) : the source arg for IPython (default: \"bokeh\")\n        data (dict) : the data dict to pass to ``publish_display_data``\n            Typically has the form ``{'text/html': html}``\n\n    '''\n    import IPython.core.displaypub as displaypub\n    try:\n        displaypub.publish_display_data(source, data)\n    except TypeError:\n        displaypub.publish_display_data(data)\n\ndef get_comms(target_name):\n    ''' Create a Jupyter comms object for a specific target, that can\n    be used to update Bokeh documents in the notebook.\n\n    Args:\n        target_name (str) : the target name the Comms object should connect to\n\n    Returns\n        Jupyter Comms\n\n    '''\n    from ipykernel.comm import Comm\n    return Comm(target_name=target_name, data={})\n", "path": "bokeh/util/notebook.py"}], "after_files": [{"content": "''' The templates module contains Jinja2 templates used by Bokeh embed\nBokeh models (e.g. plots, widgets, layouts) in various ways.\n\n.. bokeh-jinja:: bokeh.core.templates.AUTOLOAD_JS\n.. bokeh-jinja:: bokeh.core.templates.AUTOLOAD_NB_JS\n.. bokeh-jinja:: bokeh.core.templates.AUTOLOAD_TAG\n.. bokeh-jinja:: bokeh.core.templates.CSS_RESOURCES\n.. bokeh-jinja:: bokeh.core.templates.DOC_JS\n.. bokeh-jinja:: bokeh.core.templates.FILE\n.. bokeh-jinja:: bokeh.core.templates.JS_RESOURCES\n.. bokeh-jinja:: bokeh.core.templates.NOTEBOOK_LOAD\n.. bokeh-jinja:: bokeh.core.templates.NOTEBOOK_DIV\n.. bokeh-jinja:: bokeh.core.templates.PLOT_DIV\n.. bokeh-jinja:: bokeh.core.templates.SCRIPT_TAG\n\n'''\nfrom __future__ import absolute_import\n\nimport json\n\nfrom jinja2 import Environment, PackageLoader, Markup\n\n_env = Environment(loader=PackageLoader('bokeh.core', '_templates'))\n_env.filters['json'] = lambda obj: Markup(json.dumps(obj))\n\nJS_RESOURCES = _env.get_template(\"js_resources.html\")\nCSS_RESOURCES = _env.get_template(\"css_resources.html\")\n\nSCRIPT_TAG = _env.get_template(\"script_tag.html\")\n\nPLOT_DIV = _env.get_template(\"plot_div.html\")\n\nDOC_JS = _env.get_template(\"doc_js.js\")\n\nFILE = _env.get_template(\"file.html\")\n\nNOTEBOOK_LOAD = _env.get_template(\"notebook_load.html\")\nNOTEBOOK_DIV = _env.get_template(\"notebook_div.html\")\n\nAUTOLOAD_JS = _env.get_template(\"autoload_js.js\")\nAUTOLOAD_NB_JS = _env.get_template(\"autoload_nb_js.js\")\nAUTOLOAD_TAG = _env.get_template(\"autoload_tag.html\")\n", "path": "bokeh/core/templates.py"}, {"content": "''' Functions useful for loading Bokeh code and data in IPython notebooks.\n\n'''\nfrom __future__ import absolute_import\n\n_notebook_loaded = None\n\ndef load_notebook(resources=None, verbose=False, hide_banner=False, load_timeout=5000):\n    ''' Prepare the IPython notebook for displaying Bokeh plots.\n\n    Args:\n        resources (Resource, optional) :\n            how and where to load BokehJS from (default: CDN)\n\n        verbose (bool, optional) :\n            whether to report detailed settings (default: False)\n\n        hide_banner (bool, optional):\n            whether to hide the Bokeh banner (default: False)\n\n        load_timeout (int, optional) :\n            Timeout in milliseconds when plots assume load timed out (default: 5000)\n\n    .. warning::\n        Clearing the output cell containing the published BokehJS\n        resources HTML code may cause Bokeh CSS styling to be removed.\n\n    Returns:\n        None\n\n    '''\n    html, js = _load_notebook_html(resources, verbose, hide_banner, load_timeout)\n    publish_display_data({'text/html': html})\n    publish_display_data({'application/javascript': js})\n\nFINALIZE_JS = \"\"\"\ndocument.getElementById(\"%s\").textContent = \"BokehJS is loading...\";\n\"\"\"\n\ndef _load_notebook_html(resources=None, verbose=False, hide_banner=False,\n                        load_timeout=5000):\n    global _notebook_loaded\n\n    from .. import __version__\n    from ..core.templates import AUTOLOAD_NB_JS, NOTEBOOK_LOAD\n    from ..util.serialization import make_id\n    from ..resources import CDN\n\n    if resources is None:\n        resources = CDN\n\n    if resources.mode == 'inline':\n        js_info = 'inline'\n        css_info = 'inline'\n    else:\n        js_info = resources.js_files[0] if len(resources.js_files) == 1 else resources.js_files\n        css_info = resources.css_files[0] if len(resources.css_files) == 1 else resources.css_files\n\n    warnings = [\"Warning: \" + msg['text'] for msg in resources.messages if msg['type'] == 'warn']\n\n    if _notebook_loaded and verbose:\n        warnings.append('Warning: BokehJS previously loaded')\n\n    _notebook_loaded = resources\n\n    element_id = make_id()\n\n    html = NOTEBOOK_LOAD.render(\n        element_id    = element_id,\n        verbose       = verbose,\n        js_info       = js_info,\n        css_info      = css_info,\n        bokeh_version = __version__,\n        warnings      = warnings,\n        hide_banner   = hide_banner,\n    )\n\n    js = AUTOLOAD_NB_JS.render(\n        elementid = '' if hide_banner else element_id,\n        js_urls  = resources.js_files,\n        css_urls = resources.css_files,\n        js_raw   = resources.js_raw + ([] if hide_banner else [FINALIZE_JS % element_id]),\n        css_raw  = resources.css_raw_str,\n        force    = True,\n        timeout  = load_timeout\n    )\n\n    return html, js\n\ndef publish_display_data(data, source='bokeh'):\n    ''' Compatibility wrapper for IPython ``publish_display_data``\n\n    Later versions of IPython remove the ``source`` (first) argument. This\n    function insulates Bokeh library code from this change.\n\n    Args:\n        source (str, optional) : the source arg for IPython (default: \"bokeh\")\n        data (dict) : the data dict to pass to ``publish_display_data``\n            Typically has the form ``{'text/html': html}``\n\n    '''\n    import IPython.core.displaypub as displaypub\n    try:\n        displaypub.publish_display_data(source, data)\n    except TypeError:\n        displaypub.publish_display_data(data)\n\ndef get_comms(target_name):\n    ''' Create a Jupyter comms object for a specific target, that can\n    be used to update Bokeh documents in the notebook.\n\n    Args:\n        target_name (str) : the target name the Comms object should connect to\n\n    Returns\n        Jupyter Comms\n\n    '''\n    from ipykernel.comm import Comm\n    return Comm(target_name=target_name, data={})\n", "path": "bokeh/util/notebook.py"}]}