Execute a blocking loop that runs and executes event callbacks
        until the connection is closed (e.g. by hitting Ctrl-C).

        While this method can be used to run Bokeh application code "outside"
        the Bokeh server, this practice is HIGHLY DISCOURAGED for any real
        use case. This function is intented to facilitate testing ONLY.

def loop_until_closed(self, suppress_warning=False):
        ''' Execute a blocking loop that runs and executes event callbacks
        until the connection is closed (e.g. by hitting Ctrl-C).

        While this method can be used to run Bokeh application code "outside"
        the Bokeh server, this practice is HIGHLY DISCOURAGED for any real
        use case. This function is intented to facilitate testing ONLY.

        '''

        suppress_warning # shut up flake

        from bokeh.util.deprecation import deprecated
        deprecated("ClientSession.loop_until_closed is deprecated, and will be removed in an eventual 2.0 release. "
                   "Run Bokeh applications directly on a Bokeh server instead. See:\n\n"
                   "    https//docs.bokeh.org/en/latest/docs/user_guide/server.html\n")

        self._connection.loop_until_closed()