@classmethod
    def tornadio_initialize(cls, connection, user_settings, resource,
                            io_loop=None, extra_re=None, extra_sep=None):


        # Associate connection object
        cls._connection = connection

        # Initialize io_loop
        cls.io_loop = io_loop or ioloop.IOLoop.instance()

        # Associate settings
        settings = DEFAULT_SETTINGS.copy()

        if user_settings is not None:
            settings.update(user_settings)

        cls.settings = settings

        # Initialize sessions
        cls._sessions = session.SessionContainer()

        check_interval = settings['session_check_interval'] * 1000
        cls._sessions_cleanup = ioloop.PeriodicCallback(cls._sessions.expire,
                                                        check_interval,
                                                        cls.io_loop).start()

        # Copied from SocketTornad.IO with minor formatting
        if extra_re:
            if not extra_re.startswith('(?P<extra>'):
                extra_re = r'(?P<extra>%s)' % extra_re
            if extra_sep:
                extra_re = extra_sep + extra_re
        else:
            extra_re = "(?P<extra>)"

        proto_re = "|".join(PROTOCOLS.keys())

        cls._route = (r"/(?P<resource>%s)%s/"
                      "(?P<protocol>%s)/?"
                      "(?P<session_id>[0-9a-zA-Z]*)/?"
                      "(?P<protocol_init>\d*?)|(?P<xhr_path>\w*?)/?"
                      "(?P<jsonp_index>\d*?)" % (resource,
                                                 extra_re,
                                                 proto_re),
                      cls)
Teardown/Close Out the SubscriptionUpdateViewTest TestCase
dataset/ETHPy150Open mrjoes/tornadio/tornadio/router.py/SocketRouterBase.tornadio_initialize--crossover with--dataset/ETHPy150Open ofa/connect/open_connect/notifications/tests/test_views.py/SubscriptionUpdateViewTest.tearDown