    def init_ioloop(self):
        """init_ioloop added in jupyter-server 1.9"""
        # avoid deprecated access to current event loop
        if getattr(self, "io_loop", None) is None:
            try:
                asyncio.get_running_loop()
            except RuntimeError:
                # not running, make our own loop
                self.io_loop = ioloop.IOLoop(make_current=False)
            else:
                # running, use IOLoop.current
                self.io_loop = ioloop.IOLoop.current()

        # Make our event loop the 'current' event loop.
        # FIXME: this shouldn't be necessary, but it is.
        # notebookapp (<=6.4, at least), and
        # jupyter-server (<=1.17.0, at least) still need the 'current' event loop to be defined
        with warnings.catch_warnings():
            warnings.simplefilter("ignore")
            self.io_loop.make_current()
init_ioloop added in jupyter-server 1.9
jupyterhub/singleuser/mixins.py