We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[DOCS] page for selection tools does not tell users how to get the values/indices of the selection
I've been talking with another bokeh user at Scipy 2019 and found we shared very similar frustrations when starting to work with bokeh selections. The problem is the [documentation page for selection tools](https://bokeh.pydata.org/en/latest/docs/user_guide/tools.html#boxselecttool
) at bokeh.pydata.org does not include information on how you can get the indices/values after you have selected something.

(It's not that there's no documentation on this, the problem is that it's split up & scattered around the place, plus is difficult to surface on google.)

--- 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/models/selections.py`
Content:
```
1 #-----------------------------------------------------------------------------
2 # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors.
3 # All rights reserved.
4 #
5 # The full license is in the file LICENSE.txt, distributed with this software.
6 #-----------------------------------------------------------------------------
7 
8 #-----------------------------------------------------------------------------
9 # Boilerplate
10 #-----------------------------------------------------------------------------
11 from __future__ import absolute_import, division, print_function, unicode_literals
12 
13 import logging
14 log = logging.getLogger(__name__)
15 
16 #-----------------------------------------------------------------------------
17 # Imports
18 #-----------------------------------------------------------------------------
19 
20 # Standard library imports
21 
22 # External imports
23 
24 # Bokeh imports
25 from ..core.has_props import abstract
26 from ..core.properties import Dict, Int, Seq, String
27 from ..model import Model
28 
29 #-----------------------------------------------------------------------------
30 # Globals and constants
31 #-----------------------------------------------------------------------------
32 
33 __all__ = (
34     'IntersectRenderers',
35     'Selection',
36     'SelectionPolicy',
37     'UnionRenderers',
38 )
39 
40 #-----------------------------------------------------------------------------
41 # General API
42 #-----------------------------------------------------------------------------
43 
44 class Selection(Model):
45     '''
46     A Selection represents a portion of the data in a ``DataSource``, which
47     can be visually manipulated in a plot.
48 
49     Selections are typically created by selecting points in a plot with
50     a ``SelectTool``, but can also be programmatically specified.
51 
52     '''
53 
54     indices = Seq(Int, default=[], help="""
55     The indices included in a selection.
56     """)
57 
58     line_indices = Seq(Int, default=[], help="""
59     """)
60 
61     multiline_indices = Dict(String, Seq(Int), default={}, help="""
62     """)
63 
64     # TODO (bev) image_indicies
65 
66 @abstract
67 class SelectionPolicy(Model):
68     '''
69 
70     '''
71 
72     pass
73 
74 class IntersectRenderers(SelectionPolicy):
75     '''
76     When a data source is shared between multiple renderers, a row in the data
77     source will only be selected if that point for each renderer is selected. The
78     selection is made from the intersection of hit test results from all renderers.
79 
80     '''
81 
82     pass
83 
84 class UnionRenderers(SelectionPolicy):
85     '''
86     When a data source is shared between multiple renderers, selecting a point on
87     from any renderer will cause that row in the data source to be selected. The
88     selection is made from the union of hit test results from all renderers.
89 
90     '''
91 
92     pass
93 
94 #-----------------------------------------------------------------------------
95 # Dev API
96 #-----------------------------------------------------------------------------
97 
98 #-----------------------------------------------------------------------------
99 # Private API
100 #-----------------------------------------------------------------------------
101 
102 #-----------------------------------------------------------------------------
103 # Code
104 #-----------------------------------------------------------------------------
105
```
--- 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/models/selections.py b/bokeh/models/selections.py
--- a/bokeh/models/selections.py
+++ b/bokeh/models/selections.py
@@ -49,16 +49,37 @@
     Selections are typically created by selecting points in a plot with
     a ``SelectTool``, but can also be programmatically specified.
 
+    For most glyphs, the ``indices`` property is the relevant value to use.
+
     '''
 
     indices = Seq(Int, default=[], help="""
-    The indices included in a selection.
+    The "scatter" level indices included in a selection. For example, for a
+    selection on a ``Circle`` glyph, this list records the indices of whicn
+    individual circles are selected.
+
+    For "multi" glyphs such as ``Patches``, ``MultiLine``, ``MultiPolygons``,
+    etc, this list records the indices of which entire sub-items are selected.
+    For example, which indidual polygons of a ``MultiPolygon`` are selected.
     """)
 
     line_indices = Seq(Int, default=[], help="""
+    The point indices included in a selection on a ``Line`` glyph.
+
+    This value records the indices of the individual points on a ``Line`` that
+    were selected by a selection tool.
     """)
 
     multiline_indices = Dict(String, Seq(Int), default={}, help="""
+    The detailed point indices included in a selection on a ``MultiLine``.
+
+    This value records which points, on which lines, are part of a seletion on
+    a ``MulitLine``. The keys are the top level indices (i.e., which line)
+    which map to lists of indices (i.e. which points on that line).
+
+    If you only need to know which lines are selected, without knowing what
+    individual points on those lines are selected, then you can look at the
+    keys of this dictionary (converted to ints).
     """)
 
     # TODO (bev) image_indicies

{"golden_diff": "diff --git a/bokeh/models/selections.py b/bokeh/models/selections.py\n--- a/bokeh/models/selections.py\n+++ b/bokeh/models/selections.py\n@@ -49,16 +49,37 @@\n     Selections are typically created by selecting points in a plot with\n     a ``SelectTool``, but can also be programmatically specified.\n \n+    For most glyphs, the ``indices`` property is the relevant value to use.\n+\n     '''\n \n     indices = Seq(Int, default=[], help=\"\"\"\n-    The indices included in a selection.\n+    The \"scatter\" level indices included in a selection. For example, for a\n+    selection on a ``Circle`` glyph, this list records the indices of whicn\n+    individual circles are selected.\n+\n+    For \"multi\" glyphs such as ``Patches``, ``MultiLine``, ``MultiPolygons``,\n+    etc, this list records the indices of which entire sub-items are selected.\n+    For example, which indidual polygons of a ``MultiPolygon`` are selected.\n     \"\"\")\n \n     line_indices = Seq(Int, default=[], help=\"\"\"\n+    The point indices included in a selection on a ``Line`` glyph.\n+\n+    This value records the indices of the individual points on a ``Line`` that\n+    were selected by a selection tool.\n     \"\"\")\n \n     multiline_indices = Dict(String, Seq(Int), default={}, help=\"\"\"\n+    The detailed point indices included in a selection on a ``MultiLine``.\n+\n+    This value records which points, on which lines, are part of a seletion on\n+    a ``MulitLine``. The keys are the top level indices (i.e., which line)\n+    which map to lists of indices (i.e. which points on that line).\n+\n+    If you only need to know which lines are selected, without knowing what\n+    individual points on those lines are selected, then you can look at the\n+    keys of this dictionary (converted to ints).\n     \"\"\")\n \n     # TODO (bev) image_indicies\n", "issue": "[DOCS] page for selection tools does not tell users how to get the values/indices of the selection\nI've been talking with another bokeh user at Scipy 2019 and found we shared very similar frustrations when starting to work with bokeh selections. The problem is the [documentation page for selection tools](https://bokeh.pydata.org/en/latest/docs/user_guide/tools.html#boxselecttool\r\n) at bokeh.pydata.org does not include information on how you can get the indices/values after you have selected something.\r\n\r\n(It's not that there's no documentation on this, the problem is that it's split up & scattered around the place, plus is difficult to surface on google.)\n", "before_files": [{"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors.\n# All rights reserved.\n#\n# The full license is in the file LICENSE.txt, distributed with this software.\n#-----------------------------------------------------------------------------\n\n#-----------------------------------------------------------------------------\n# Boilerplate\n#-----------------------------------------------------------------------------\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport logging\nlog = logging.getLogger(__name__)\n\n#-----------------------------------------------------------------------------\n# Imports\n#-----------------------------------------------------------------------------\n\n# Standard library imports\n\n# External imports\n\n# Bokeh imports\nfrom ..core.has_props import abstract\nfrom ..core.properties import Dict, Int, Seq, String\nfrom ..model import Model\n\n#-----------------------------------------------------------------------------\n# Globals and constants\n#-----------------------------------------------------------------------------\n\n__all__ = (\n    'IntersectRenderers',\n    'Selection',\n    'SelectionPolicy',\n    'UnionRenderers',\n)\n\n#-----------------------------------------------------------------------------\n# General API\n#-----------------------------------------------------------------------------\n\nclass Selection(Model):\n    '''\n    A Selection represents a portion of the data in a ``DataSource``, which\n    can be visually manipulated in a plot.\n\n    Selections are typically created by selecting points in a plot with\n    a ``SelectTool``, but can also be programmatically specified.\n\n    '''\n\n    indices = Seq(Int, default=[], help=\"\"\"\n    The indices included in a selection.\n    \"\"\")\n\n    line_indices = Seq(Int, default=[], help=\"\"\"\n    \"\"\")\n\n    multiline_indices = Dict(String, Seq(Int), default={}, help=\"\"\"\n    \"\"\")\n\n    # TODO (bev) image_indicies\n\n@abstract\nclass SelectionPolicy(Model):\n    '''\n\n    '''\n\n    pass\n\nclass IntersectRenderers(SelectionPolicy):\n    '''\n    When a data source is shared between multiple renderers, a row in the data\n    source will only be selected if that point for each renderer is selected. The\n    selection is made from the intersection of hit test results from all renderers.\n\n    '''\n\n    pass\n\nclass UnionRenderers(SelectionPolicy):\n    '''\n    When a data source is shared between multiple renderers, selecting a point on\n    from any renderer will cause that row in the data source to be selected. The\n    selection is made from the union of hit test results from all renderers.\n\n    '''\n\n    pass\n\n#-----------------------------------------------------------------------------\n# Dev API\n#-----------------------------------------------------------------------------\n\n#-----------------------------------------------------------------------------\n# Private API\n#-----------------------------------------------------------------------------\n\n#-----------------------------------------------------------------------------\n# Code\n#-----------------------------------------------------------------------------\n", "path": "bokeh/models/selections.py"}], "after_files": [{"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors.\n# All rights reserved.\n#\n# The full license is in the file LICENSE.txt, distributed with this software.\n#-----------------------------------------------------------------------------\n\n#-----------------------------------------------------------------------------\n# Boilerplate\n#-----------------------------------------------------------------------------\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport logging\nlog = logging.getLogger(__name__)\n\n#-----------------------------------------------------------------------------\n# Imports\n#-----------------------------------------------------------------------------\n\n# Standard library imports\n\n# External imports\n\n# Bokeh imports\nfrom ..core.has_props import abstract\nfrom ..core.properties import Dict, Int, Seq, String\nfrom ..model import Model\n\n#-----------------------------------------------------------------------------\n# Globals and constants\n#-----------------------------------------------------------------------------\n\n__all__ = (\n    'IntersectRenderers',\n    'Selection',\n    'SelectionPolicy',\n    'UnionRenderers',\n)\n\n#-----------------------------------------------------------------------------\n# General API\n#-----------------------------------------------------------------------------\n\nclass Selection(Model):\n    '''\n    A Selection represents a portion of the data in a ``DataSource``, which\n    can be visually manipulated in a plot.\n\n    Selections are typically created by selecting points in a plot with\n    a ``SelectTool``, but can also be programmatically specified.\n\n    For most glyphs, the ``indices`` property is the relevant value to use.\n\n    '''\n\n    indices = Seq(Int, default=[], help=\"\"\"\n    The \"scatter\" level indices included in a selection. For example, for a\n    selection on a ``Circle`` glyph, this list records the indices of whicn\n    individual circles are selected.\n\n    For \"multi\" glyphs such as ``Patches``, ``MultiLine``, ``MultiPolygons``,\n    etc, this list records the indices of which entire sub-items are selected.\n    For example, which indidual polygons of a ``MultiPolygon`` are selected.\n    \"\"\")\n\n    line_indices = Seq(Int, default=[], help=\"\"\"\n    The point indices included in a selection on a ``Line`` glyph.\n\n    This value records the indices of the individual points on a ``Line`` that\n    were selected by a selection tool.\n    \"\"\")\n\n    multiline_indices = Dict(String, Seq(Int), default={}, help=\"\"\"\n    The detailed point indices included in a selection on a ``MultiLine``.\n\n    This value records which points, on which lines, are part of a seletion on\n    a ``MulitLine``. The keys are the top level indices (i.e., which line)\n    which map to lists of indices (i.e. which points on that line).\n\n    If you only need to know which lines are selected, without knowing what\n    individual points on those lines are selected, then you can look at the\n    keys of this dictionary (converted to ints).\n    \"\"\")\n\n    # TODO (bev) image_indicies\n\n@abstract\nclass SelectionPolicy(Model):\n    '''\n\n    '''\n\n    pass\n\nclass IntersectRenderers(SelectionPolicy):\n    '''\n    When a data source is shared between multiple renderers, a row in the data\n    source will only be selected if that point for each renderer is selected. The\n    selection is made from the intersection of hit test results from all renderers.\n\n    '''\n\n    pass\n\nclass UnionRenderers(SelectionPolicy):\n    '''\n    When a data source is shared between multiple renderers, selecting a point on\n    from any renderer will cause that row in the data source to be selected. The\n    selection is made from the union of hit test results from all renderers.\n\n    '''\n\n    pass\n\n#-----------------------------------------------------------------------------\n# Dev API\n#-----------------------------------------------------------------------------\n\n#-----------------------------------------------------------------------------\n# Private API\n#-----------------------------------------------------------------------------\n\n#-----------------------------------------------------------------------------\n# Code\n#-----------------------------------------------------------------------------\n", "path": "bokeh/models/selections.py"}]}