We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Undeprecate VBox and HBox
I would like names `VBox` and `HBox` to stay, because they are more meaningful to from UI point of view than the new counterparts.


--- 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/layouts.py`
Content:
```
1 """ Various kinds of layout components.
2 
3 """
4 from __future__ import absolute_import
5 
6 import warnings
7 import logging
8 logger = logging.getLogger(__name__)
9 
10 from ..core import validation
11 
12 from ..core.validation.warnings import (
13     EMPTY_LAYOUT,
14     BOTH_CHILD_AND_ROOT,
15 )
16 from ..core.enums import Location, Responsive as ResponsiveEnum
17 from ..core.properties import abstract, Bool, Int, Instance, List, Responsive, Override
18 from ..embed import notebook_div
19 from ..model import Model
20 from ..util.deprecate import deprecated
21 
22 
23 @abstract
24 class LayoutDOM(Model):
25     """ An abstract base class for layout components. ``LayoutDOM`` is not
26     generally useful to instantiate on its own.
27 
28     """
29 
30     width = Int(help="""
31     An optional width for the component (in pixels).
32     """)
33 
34     height = Int(help="""
35     An optional height for the component (in pixels).
36     """)
37 
38     disabled = Bool(False, help="""
39     Whether the widget will be disabled when rendered. If ``True``,
40     the widget will be greyed-out, and not respond to UI events.
41     """)
42 
43     responsive = Responsive(help="""
44     The type of responsiveness for the item being displayed. Possible values are
45     ``"fixed"`` (or ``False``), ``"scale_width"`` (or ``True``),
46     ``"scale_height"``, ``"scale_both"``, ``"stretch_both"``.
47 
48     ``"stretch_both"`` elements are completely responsive (independently in width and height) and
49     will resize to occupy all available space, even if this changes the aspect ratio of the element.
50     This is sometimes called outside-in, and is a typical behavior for desktop applications.
51 
52     ``"fixed"`` elements are not responsive. They will retain their original width and height
53     regardless of any subsequent browser window resize events.
54 
55     ``"scale_width"`` elements will responsively resize to fit to the width available, *while
56     maintaining the original aspect ratio*. This is a typical behavior for modern websites. For a
57     ``Plot``, the aspect ratio ``plot_width/plot_height`` is maintained.
58 
59     ``"scale_height"`` elements will responsively resize to fit to the height available, *while
60     maintaining the original aspect ratio*. For a ``Plot``, the aspect ratio
61     ``plot_width/plot_height`` is maintained. A plot with ``"scale_height"`` mode needs
62     to be wrapped in a ``Row`` or ``Column`` to be responsive.
63 
64 
65     ``"scale_both"`` elements will responsively resize to fir both the width and height available,
66     *while maintaining the original aspect ratio*.
67 
68     """)
69 
70     # TODO: (mp) Not yet, because it breaks plotting/notebook examples.
71     # Rename to _repr_html_ if we decide to enable this by default.
72     def __repr_html__(self):
73         return notebook_div(self)
74 
75     @property
76     def html(self):
77         from IPython.core.display import HTML
78         return HTML(self.__repr_html__())
79 
80 
81 class Spacer(LayoutDOM):
82     """ A container for space used to fill an empty spot in a row or column.
83 
84     """
85 
86 
87 class WidgetBox(LayoutDOM):
88     """ A container for widgets that are part of a layout."""
89     def __init__(self, *args, **kwargs):
90         if len(args) > 0 and "children" in kwargs:
91             raise ValueError("'children' keyword cannot be used with positional arguments")
92         elif len(args) > 0:
93             kwargs["children"] = list(args)
94         super(WidgetBox, self).__init__(**kwargs)
95 
96     @validation.warning(EMPTY_LAYOUT)
97     def _check_empty_layout(self):
98         from itertools import chain
99         if not list(chain(self.children)):
100             return str(self)
101 
102     @validation.warning(BOTH_CHILD_AND_ROOT)
103     def _check_child_is_also_root(self):
104         problems = []
105         for c in self.children:
106             if c.document is not None and c in c.document.roots:
107                 problems.append(str(c))
108         if problems:
109             return ", ".join(problems)
110         else:
111             return None
112 
113     children = List(Instance('bokeh.models.widgets.Widget'), help="""
114         The list of widgets to put in the layout box.
115     """)
116 
117     responsive = Override(default='fixed')
118 
119 
120 @abstract
121 class Box(LayoutDOM):
122     """ Abstract base class for Row and Column. Do not use directly.
123     """
124 
125     def __init__(self, *args, **kwargs):
126 
127         if len(args) > 0 and "children" in kwargs:
128             raise ValueError("'children' keyword cannot be used with positional arguments")
129         elif len(args) > 0:
130             kwargs["children"] = list(args)
131 
132         unwrapped_children = kwargs.get("children", [])
133         kwargs["children"] = self._wrap_children(unwrapped_children)
134         super(Box, self).__init__(**kwargs)
135 
136     def _wrap_children(self, children):
137         """ Wrap any Widgets of a list of child layouts in a WidgetBox.
138         This allows for the convenience of just spelling Row(button1, button2).
139         """
140         from .widgets.widget import Widget
141         wrapped_children = []
142         for child in children:
143             if isinstance(child, Widget):
144                 child = WidgetBox(
145                     children=[child],
146                     responsive=child.responsive,
147                     width=child.width,
148                     height=child.height,
149                     disabled=child.disabled
150                 )
151             wrapped_children.append(child)
152         return wrapped_children
153 
154     @validation.warning(EMPTY_LAYOUT)
155     def _check_empty_layout(self):
156         from itertools import chain
157         if not list(chain(self.children)):
158             return str(self)
159 
160     @validation.warning(BOTH_CHILD_AND_ROOT)
161     def _check_child_is_also_root(self):
162         problems = []
163         for c in self.children:
164             if c.document is not None and c in c.document.roots:
165                 problems.append(str(c))
166         if problems:
167             return ", ".join(problems)
168         else:
169             return None
170 
171     #TODO Debating the following instead to prevent people adding just a plain
172     #     widget into a box, which sometimes works and sometimes looks disastrous
173     #children = List(
174     #    Either(
175     #        Instance('bokeh.models.layouts.Row'),
176     #        Instance('bokeh.models.layouts.Column'),
177     #        Instance('bokeh.models.plots.Plot'),
178     #        Instance('bokeh.models.layouts.WidgetBox')
179     #    ), help="""
180     #    The list of children, which can be other components including plots, rows, columns, and widgets.
181     #""")
182     children = List(Instance(LayoutDOM), help="""
183         The list of children, which can be other components including plots, rows, columns, and widgets.
184     """)
185 
186     responsive = Override(default='fixed')
187 
188 
189 class Row(Box):
190     """ Lay out child components in a single horizontal row.
191 
192     Children can be specified as positional arguments, as a single argument
193     that is a sequence, or using the ``children`` keyword argument.
194     """
195 
196 
197 class Column(Box):
198     """ Lay out child components in a single vertical row.
199 
200     Children can be specified as positional arguments, as a single argument
201     that is a sequence, or using the ``children`` keyword argument.
202     """
203 
204 
205 # ---- DEPRECATIONS
206 
207 @deprecated("Bokeh 0.12.0", "bokeh.layouts.gridplot")
208 def GridPlot(*args, **kwargs):
209     from bokeh.layouts import gridplot
210     return gridplot(*args, **kwargs)
211 
212 
213 @deprecated("Bokeh 0.12.0", "bokeh.models.layouts.Row")
214 def HBox(*args, **kwargs):
215     return Row(*args, **kwargs)
216 
217 
218 @deprecated("Bokeh 0.12.0", "bokeh.models.layouts.Column")
219 def VBox(*args, **kwargs):
220     return Column(*args, **kwargs)
221 
222 
223 @deprecated("Bokeh 0.12.0", "bokeh.models.layouts.WidgetBox")
224 def VBoxForm(*args, **kwargs):
225     from bokeh.models.widgets.widget import Widget
226 
227     if len(args) > 0 and "children" in kwargs:
228         raise ValueError("'children' keyword cannot be used with positional arguments")
229     elif len(args) > 0:
230         children = list(args)
231     else:
232         children = kwargs.get("children", [])
233     is_widget = [isinstance(item, Widget) for item in children]
234     if all(is_widget):
235         return WidgetBox(*args, **kwargs)
236     else:
237         warnings.warn(
238             """WARNING: Non-widgets added to VBoxForm! VBoxForm is deprecated and is
239             being replaced with WidgetBox. WidgetBox does not allow you to add non-widgets to it.
240             We have transformed your request into a Column, with your Plots and WidgetBox(es) inside
241             it. In the future, you will need to update your code to use Row and Column. You may
242             find the new bokeh.layouts functions helpful.
243             """)
244         return Column(*args, **kwargs)
245
```
--- 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/layouts.py b/bokeh/models/layouts.py
--- a/bokeh/models/layouts.py
+++ b/bokeh/models/layouts.py
@@ -202,23 +202,33 @@
     """
 
 
-# ---- DEPRECATIONS
-
-@deprecated("Bokeh 0.12.0", "bokeh.layouts.gridplot")
-def GridPlot(*args, **kwargs):
-    from bokeh.layouts import gridplot
-    return gridplot(*args, **kwargs)
+def HBox(*args, **kwargs):
+    """ Lay out child components in a single horizontal row.
 
+    Children can be specified as positional arguments, as a single argument
+    that is a sequence, or using the ``children`` keyword argument.
 
-@deprecated("Bokeh 0.12.0", "bokeh.models.layouts.Row")
-def HBox(*args, **kwargs):
+    Returns a Row instance.
+    """
     return Row(*args, **kwargs)
 
 
-@deprecated("Bokeh 0.12.0", "bokeh.models.layouts.Column")
 def VBox(*args, **kwargs):
+    """ Lay out child components in a single vertical row.
+
+    Children can be specified as positional arguments, as a single argument
+    that is a sequence, or using the ``children`` keyword argument.
+
+    Returns a Column instance.
+    """
     return Column(*args, **kwargs)
 
+# ---- DEPRECATIONS
+
+@deprecated("Bokeh 0.12.0", "bokeh.layouts.gridplot")
+def GridPlot(*args, **kwargs):
+    from bokeh.layouts import gridplot
+    return gridplot(*args, **kwargs)
 
 @deprecated("Bokeh 0.12.0", "bokeh.models.layouts.WidgetBox")
 def VBoxForm(*args, **kwargs):

{"golden_diff": "diff --git a/bokeh/models/layouts.py b/bokeh/models/layouts.py\n--- a/bokeh/models/layouts.py\n+++ b/bokeh/models/layouts.py\n@@ -202,23 +202,33 @@\n     \"\"\"\n \n \n-# ---- DEPRECATIONS\n-\n-@deprecated(\"Bokeh 0.12.0\", \"bokeh.layouts.gridplot\")\n-def GridPlot(*args, **kwargs):\n-    from bokeh.layouts import gridplot\n-    return gridplot(*args, **kwargs)\n+def HBox(*args, **kwargs):\n+    \"\"\" Lay out child components in a single horizontal row.\n \n+    Children can be specified as positional arguments, as a single argument\n+    that is a sequence, or using the ``children`` keyword argument.\n \n-@deprecated(\"Bokeh 0.12.0\", \"bokeh.models.layouts.Row\")\n-def HBox(*args, **kwargs):\n+    Returns a Row instance.\n+    \"\"\"\n     return Row(*args, **kwargs)\n \n \n-@deprecated(\"Bokeh 0.12.0\", \"bokeh.models.layouts.Column\")\n def VBox(*args, **kwargs):\n+    \"\"\" Lay out child components in a single vertical row.\n+\n+    Children can be specified as positional arguments, as a single argument\n+    that is a sequence, or using the ``children`` keyword argument.\n+\n+    Returns a Column instance.\n+    \"\"\"\n     return Column(*args, **kwargs)\n \n+# ---- DEPRECATIONS\n+\n+@deprecated(\"Bokeh 0.12.0\", \"bokeh.layouts.gridplot\")\n+def GridPlot(*args, **kwargs):\n+    from bokeh.layouts import gridplot\n+    return gridplot(*args, **kwargs)\n \n @deprecated(\"Bokeh 0.12.0\", \"bokeh.models.layouts.WidgetBox\")\n def VBoxForm(*args, **kwargs):\n", "issue": "Undeprecate VBox and HBox\nI would like names `VBox` and `HBox` to stay, because they are more meaningful to from UI point of view than the new counterparts.\n\n", "before_files": [{"content": "\"\"\" Various kinds of layout components.\n\n\"\"\"\nfrom __future__ import absolute_import\n\nimport warnings\nimport logging\nlogger = logging.getLogger(__name__)\n\nfrom ..core import validation\n\nfrom ..core.validation.warnings import (\n    EMPTY_LAYOUT,\n    BOTH_CHILD_AND_ROOT,\n)\nfrom ..core.enums import Location, Responsive as ResponsiveEnum\nfrom ..core.properties import abstract, Bool, Int, Instance, List, Responsive, Override\nfrom ..embed import notebook_div\nfrom ..model import Model\nfrom ..util.deprecate import deprecated\n\n\n@abstract\nclass LayoutDOM(Model):\n    \"\"\" An abstract base class for layout components. ``LayoutDOM`` is not\n    generally useful to instantiate on its own.\n\n    \"\"\"\n\n    width = Int(help=\"\"\"\n    An optional width for the component (in pixels).\n    \"\"\")\n\n    height = Int(help=\"\"\"\n    An optional height for the component (in pixels).\n    \"\"\")\n\n    disabled = Bool(False, help=\"\"\"\n    Whether the widget will be disabled when rendered. If ``True``,\n    the widget will be greyed-out, and not respond to UI events.\n    \"\"\")\n\n    responsive = Responsive(help=\"\"\"\n    The type of responsiveness for the item being displayed. Possible values are\n    ``\"fixed\"`` (or ``False``), ``\"scale_width\"`` (or ``True``),\n    ``\"scale_height\"``, ``\"scale_both\"``, ``\"stretch_both\"``.\n\n    ``\"stretch_both\"`` elements are completely responsive (independently in width and height) and\n    will resize to occupy all available space, even if this changes the aspect ratio of the element.\n    This is sometimes called outside-in, and is a typical behavior for desktop applications.\n\n    ``\"fixed\"`` elements are not responsive. They will retain their original width and height\n    regardless of any subsequent browser window resize events.\n\n    ``\"scale_width\"`` elements will responsively resize to fit to the width available, *while\n    maintaining the original aspect ratio*. This is a typical behavior for modern websites. For a\n    ``Plot``, the aspect ratio ``plot_width/plot_height`` is maintained.\n\n    ``\"scale_height\"`` elements will responsively resize to fit to the height available, *while\n    maintaining the original aspect ratio*. For a ``Plot``, the aspect ratio\n    ``plot_width/plot_height`` is maintained. A plot with ``\"scale_height\"`` mode needs\n    to be wrapped in a ``Row`` or ``Column`` to be responsive.\n\n\n    ``\"scale_both\"`` elements will responsively resize to fir both the width and height available,\n    *while maintaining the original aspect ratio*.\n\n    \"\"\")\n\n    # TODO: (mp) Not yet, because it breaks plotting/notebook examples.\n    # Rename to _repr_html_ if we decide to enable this by default.\n    def __repr_html__(self):\n        return notebook_div(self)\n\n    @property\n    def html(self):\n        from IPython.core.display import HTML\n        return HTML(self.__repr_html__())\n\n\nclass Spacer(LayoutDOM):\n    \"\"\" A container for space used to fill an empty spot in a row or column.\n\n    \"\"\"\n\n\nclass WidgetBox(LayoutDOM):\n    \"\"\" A container for widgets that are part of a layout.\"\"\"\n    def __init__(self, *args, **kwargs):\n        if len(args) > 0 and \"children\" in kwargs:\n            raise ValueError(\"'children' keyword cannot be used with positional arguments\")\n        elif len(args) > 0:\n            kwargs[\"children\"] = list(args)\n        super(WidgetBox, self).__init__(**kwargs)\n\n    @validation.warning(EMPTY_LAYOUT)\n    def _check_empty_layout(self):\n        from itertools import chain\n        if not list(chain(self.children)):\n            return str(self)\n\n    @validation.warning(BOTH_CHILD_AND_ROOT)\n    def _check_child_is_also_root(self):\n        problems = []\n        for c in self.children:\n            if c.document is not None and c in c.document.roots:\n                problems.append(str(c))\n        if problems:\n            return \", \".join(problems)\n        else:\n            return None\n\n    children = List(Instance('bokeh.models.widgets.Widget'), help=\"\"\"\n        The list of widgets to put in the layout box.\n    \"\"\")\n\n    responsive = Override(default='fixed')\n\n\n@abstract\nclass Box(LayoutDOM):\n    \"\"\" Abstract base class for Row and Column. Do not use directly.\n    \"\"\"\n\n    def __init__(self, *args, **kwargs):\n\n        if len(args) > 0 and \"children\" in kwargs:\n            raise ValueError(\"'children' keyword cannot be used with positional arguments\")\n        elif len(args) > 0:\n            kwargs[\"children\"] = list(args)\n\n        unwrapped_children = kwargs.get(\"children\", [])\n        kwargs[\"children\"] = self._wrap_children(unwrapped_children)\n        super(Box, self).__init__(**kwargs)\n\n    def _wrap_children(self, children):\n        \"\"\" Wrap any Widgets of a list of child layouts in a WidgetBox.\n        This allows for the convenience of just spelling Row(button1, button2).\n        \"\"\"\n        from .widgets.widget import Widget\n        wrapped_children = []\n        for child in children:\n            if isinstance(child, Widget):\n                child = WidgetBox(\n                    children=[child],\n                    responsive=child.responsive,\n                    width=child.width,\n                    height=child.height,\n                    disabled=child.disabled\n                )\n            wrapped_children.append(child)\n        return wrapped_children\n\n    @validation.warning(EMPTY_LAYOUT)\n    def _check_empty_layout(self):\n        from itertools import chain\n        if not list(chain(self.children)):\n            return str(self)\n\n    @validation.warning(BOTH_CHILD_AND_ROOT)\n    def _check_child_is_also_root(self):\n        problems = []\n        for c in self.children:\n            if c.document is not None and c in c.document.roots:\n                problems.append(str(c))\n        if problems:\n            return \", \".join(problems)\n        else:\n            return None\n\n    #TODO Debating the following instead to prevent people adding just a plain\n    #     widget into a box, which sometimes works and sometimes looks disastrous\n    #children = List(\n    #    Either(\n    #        Instance('bokeh.models.layouts.Row'),\n    #        Instance('bokeh.models.layouts.Column'),\n    #        Instance('bokeh.models.plots.Plot'),\n    #        Instance('bokeh.models.layouts.WidgetBox')\n    #    ), help=\"\"\"\n    #    The list of children, which can be other components including plots, rows, columns, and widgets.\n    #\"\"\")\n    children = List(Instance(LayoutDOM), help=\"\"\"\n        The list of children, which can be other components including plots, rows, columns, and widgets.\n    \"\"\")\n\n    responsive = Override(default='fixed')\n\n\nclass Row(Box):\n    \"\"\" Lay out child components in a single horizontal row.\n\n    Children can be specified as positional arguments, as a single argument\n    that is a sequence, or using the ``children`` keyword argument.\n    \"\"\"\n\n\nclass Column(Box):\n    \"\"\" Lay out child components in a single vertical row.\n\n    Children can be specified as positional arguments, as a single argument\n    that is a sequence, or using the ``children`` keyword argument.\n    \"\"\"\n\n\n# ---- DEPRECATIONS\n\n@deprecated(\"Bokeh 0.12.0\", \"bokeh.layouts.gridplot\")\ndef GridPlot(*args, **kwargs):\n    from bokeh.layouts import gridplot\n    return gridplot(*args, **kwargs)\n\n\n@deprecated(\"Bokeh 0.12.0\", \"bokeh.models.layouts.Row\")\ndef HBox(*args, **kwargs):\n    return Row(*args, **kwargs)\n\n\n@deprecated(\"Bokeh 0.12.0\", \"bokeh.models.layouts.Column\")\ndef VBox(*args, **kwargs):\n    return Column(*args, **kwargs)\n\n\n@deprecated(\"Bokeh 0.12.0\", \"bokeh.models.layouts.WidgetBox\")\ndef VBoxForm(*args, **kwargs):\n    from bokeh.models.widgets.widget import Widget\n\n    if len(args) > 0 and \"children\" in kwargs:\n        raise ValueError(\"'children' keyword cannot be used with positional arguments\")\n    elif len(args) > 0:\n        children = list(args)\n    else:\n        children = kwargs.get(\"children\", [])\n    is_widget = [isinstance(item, Widget) for item in children]\n    if all(is_widget):\n        return WidgetBox(*args, **kwargs)\n    else:\n        warnings.warn(\n            \"\"\"WARNING: Non-widgets added to VBoxForm! VBoxForm is deprecated and is\n            being replaced with WidgetBox. WidgetBox does not allow you to add non-widgets to it.\n            We have transformed your request into a Column, with your Plots and WidgetBox(es) inside\n            it. In the future, you will need to update your code to use Row and Column. You may\n            find the new bokeh.layouts functions helpful.\n            \"\"\")\n        return Column(*args, **kwargs)\n", "path": "bokeh/models/layouts.py"}], "after_files": [{"content": "\"\"\" Various kinds of layout components.\n\n\"\"\"\nfrom __future__ import absolute_import\n\nimport warnings\nimport logging\nlogger = logging.getLogger(__name__)\n\nfrom ..core import validation\n\nfrom ..core.validation.warnings import (\n    EMPTY_LAYOUT,\n    BOTH_CHILD_AND_ROOT,\n)\nfrom ..core.enums import Location, Responsive as ResponsiveEnum\nfrom ..core.properties import abstract, Bool, Int, Instance, List, Responsive, Override\nfrom ..embed import notebook_div\nfrom ..model import Model\nfrom ..util.deprecate import deprecated\n\n\n@abstract\nclass LayoutDOM(Model):\n    \"\"\" An abstract base class for layout components. ``LayoutDOM`` is not\n    generally useful to instantiate on its own.\n\n    \"\"\"\n\n    width = Int(help=\"\"\"\n    An optional width for the component (in pixels).\n    \"\"\")\n\n    height = Int(help=\"\"\"\n    An optional height for the component (in pixels).\n    \"\"\")\n\n    disabled = Bool(False, help=\"\"\"\n    Whether the widget will be disabled when rendered. If ``True``,\n    the widget will be greyed-out, and not respond to UI events.\n    \"\"\")\n\n    responsive = Responsive(help=\"\"\"\n    The type of responsiveness for the item being displayed. Possible values are\n    ``\"fixed\"`` (or ``False``), ``\"scale_width\"`` (or ``True``),\n    ``\"scale_height\"``, ``\"scale_both\"``, ``\"stretch_both\"``.\n\n    ``\"stretch_both\"`` elements are completely responsive (independently in width and height) and\n    will resize to occupy all available space, even if this changes the aspect ratio of the element.\n    This is sometimes called outside-in, and is a typical behavior for desktop applications.\n\n    ``\"fixed\"`` elements are not responsive. They will retain their original width and height\n    regardless of any subsequent browser window resize events.\n\n    ``\"scale_width\"`` elements will responsively resize to fit to the width available, *while\n    maintaining the original aspect ratio*. This is a typical behavior for modern websites. For a\n    ``Plot``, the aspect ratio ``plot_width/plot_height`` is maintained.\n\n    ``\"scale_height\"`` elements will responsively resize to fit to the height available, *while\n    maintaining the original aspect ratio*. For a ``Plot``, the aspect ratio\n    ``plot_width/plot_height`` is maintained. A plot with ``\"scale_height\"`` mode needs\n    to be wrapped in a ``Row`` or ``Column`` to be responsive.\n\n\n    ``\"scale_both\"`` elements will responsively resize to fir both the width and height available,\n    *while maintaining the original aspect ratio*.\n\n    \"\"\")\n\n    # TODO: (mp) Not yet, because it breaks plotting/notebook examples.\n    # Rename to _repr_html_ if we decide to enable this by default.\n    def __repr_html__(self):\n        return notebook_div(self)\n\n    @property\n    def html(self):\n        from IPython.core.display import HTML\n        return HTML(self.__repr_html__())\n\n\nclass Spacer(LayoutDOM):\n    \"\"\" A container for space used to fill an empty spot in a row or column.\n\n    \"\"\"\n\n\nclass WidgetBox(LayoutDOM):\n    \"\"\" A container for widgets that are part of a layout.\"\"\"\n    def __init__(self, *args, **kwargs):\n        if len(args) > 0 and \"children\" in kwargs:\n            raise ValueError(\"'children' keyword cannot be used with positional arguments\")\n        elif len(args) > 0:\n            kwargs[\"children\"] = list(args)\n        super(WidgetBox, self).__init__(**kwargs)\n\n    @validation.warning(EMPTY_LAYOUT)\n    def _check_empty_layout(self):\n        from itertools import chain\n        if not list(chain(self.children)):\n            return str(self)\n\n    @validation.warning(BOTH_CHILD_AND_ROOT)\n    def _check_child_is_also_root(self):\n        problems = []\n        for c in self.children:\n            if c.document is not None and c in c.document.roots:\n                problems.append(str(c))\n        if problems:\n            return \", \".join(problems)\n        else:\n            return None\n\n    children = List(Instance('bokeh.models.widgets.Widget'), help=\"\"\"\n        The list of widgets to put in the layout box.\n    \"\"\")\n\n    responsive = Override(default='fixed')\n\n\n@abstract\nclass Box(LayoutDOM):\n    \"\"\" Abstract base class for Row and Column. Do not use directly.\n    \"\"\"\n\n    def __init__(self, *args, **kwargs):\n\n        if len(args) > 0 and \"children\" in kwargs:\n            raise ValueError(\"'children' keyword cannot be used with positional arguments\")\n        elif len(args) > 0:\n            kwargs[\"children\"] = list(args)\n\n        unwrapped_children = kwargs.get(\"children\", [])\n        kwargs[\"children\"] = self._wrap_children(unwrapped_children)\n        super(Box, self).__init__(**kwargs)\n\n    def _wrap_children(self, children):\n        \"\"\" Wrap any Widgets of a list of child layouts in a WidgetBox.\n        This allows for the convenience of just spelling Row(button1, button2).\n        \"\"\"\n        from .widgets.widget import Widget\n        wrapped_children = []\n        for child in children:\n            if isinstance(child, Widget):\n                child = WidgetBox(\n                    children=[child],\n                    responsive=child.responsive,\n                    width=child.width,\n                    height=child.height,\n                    disabled=child.disabled\n                )\n            wrapped_children.append(child)\n        return wrapped_children\n\n    @validation.warning(EMPTY_LAYOUT)\n    def _check_empty_layout(self):\n        from itertools import chain\n        if not list(chain(self.children)):\n            return str(self)\n\n    @validation.warning(BOTH_CHILD_AND_ROOT)\n    def _check_child_is_also_root(self):\n        problems = []\n        for c in self.children:\n            if c.document is not None and c in c.document.roots:\n                problems.append(str(c))\n        if problems:\n            return \", \".join(problems)\n        else:\n            return None\n\n    #TODO Debating the following instead to prevent people adding just a plain\n    #     widget into a box, which sometimes works and sometimes looks disastrous\n    #children = List(\n    #    Either(\n    #        Instance('bokeh.models.layouts.Row'),\n    #        Instance('bokeh.models.layouts.Column'),\n    #        Instance('bokeh.models.plots.Plot'),\n    #        Instance('bokeh.models.layouts.WidgetBox')\n    #    ), help=\"\"\"\n    #    The list of children, which can be other components including plots, rows, columns, and widgets.\n    #\"\"\")\n    children = List(Instance(LayoutDOM), help=\"\"\"\n        The list of children, which can be other components including plots, rows, columns, and widgets.\n    \"\"\")\n\n    responsive = Override(default='fixed')\n\n\nclass Row(Box):\n    \"\"\" Lay out child components in a single horizontal row.\n\n    Children can be specified as positional arguments, as a single argument\n    that is a sequence, or using the ``children`` keyword argument.\n    \"\"\"\n\n\nclass Column(Box):\n    \"\"\" Lay out child components in a single vertical row.\n\n    Children can be specified as positional arguments, as a single argument\n    that is a sequence, or using the ``children`` keyword argument.\n    \"\"\"\n\n\ndef HBox(*args, **kwargs):\n    \"\"\" Lay out child components in a single horizontal row.\n\n    Children can be specified as positional arguments, as a single argument\n    that is a sequence, or using the ``children`` keyword argument.\n\n    Returns a Row instance.\n    \"\"\"\n    return Row(*args, **kwargs)\n\n\ndef VBox(*args, **kwargs):\n    \"\"\" Lay out child components in a single vertical row.\n\n    Children can be specified as positional arguments, as a single argument\n    that is a sequence, or using the ``children`` keyword argument.\n\n    Returns a Column instance.\n    \"\"\"\n    return Column(*args, **kwargs)\n\n# ---- DEPRECATIONS\n\n@deprecated(\"Bokeh 0.12.0\", \"bokeh.layouts.gridplot\")\ndef GridPlot(*args, **kwargs):\n    from bokeh.layouts import gridplot\n    return gridplot(*args, **kwargs)\n\n@deprecated(\"Bokeh 0.12.0\", \"bokeh.models.layouts.WidgetBox\")\ndef VBoxForm(*args, **kwargs):\n    from bokeh.models.widgets.widget import Widget\n\n    if len(args) > 0 and \"children\" in kwargs:\n        raise ValueError(\"'children' keyword cannot be used with positional arguments\")\n    elif len(args) > 0:\n        children = list(args)\n    else:\n        children = kwargs.get(\"children\", [])\n    is_widget = [isinstance(item, Widget) for item in children]\n    if all(is_widget):\n        return WidgetBox(*args, **kwargs)\n    else:\n        warnings.warn(\n            \"\"\"WARNING: Non-widgets added to VBoxForm! VBoxForm is deprecated and is\n            being replaced with WidgetBox. WidgetBox does not allow you to add non-widgets to it.\n            We have transformed your request into a Column, with your Plots and WidgetBox(es) inside\n            it. In the future, you will need to update your code to use Row and Column. You may\n            find the new bokeh.layouts functions helpful.\n            \"\"\")\n        return Column(*args, **kwargs)\n", "path": "bokeh/models/layouts.py"}]}