code: def session(self, sid):
          
          class _session_context_manager(object):
              def __init__(self, server, sid):
                  self.server = server
                  self.sid = sid
                  self.session = None
  
              async def __aenter__(self):
                  self.session = await self.server.get_session(sid)
                  return self.session
  
              async def __aexit__(self, *args):
                  await self.server.save_session(sid, self.session)
  
          return _session_context_manager(self, sid)
docs: Return the user session for a client with context manager syntax.
  
          :param sid: The session id of the client.
  
          This is a context manager that returns the user session dictionary for
          the client. Any changes that are made to this dictionary inside the
          context manager block are saved back to the session. Example usage::
  
              @eio.on('connect')
              def on_connect(sid, environ):
                  username = authenticate_user(environ)
                  if not username:
                      return False
                  with eio.session(sid) as session:
                      session['username'] = username
  
              @eio.on('message')
              def on_message(sid, msg):
                  async with eio.session(sid) as session:
                      print('received message from ', session['username'])