code: def get_connection(self):
          " Return the active Connection instance. "
          app = get_app()
          for connection, client_state in self._client_states.items():
              if client_state.app == app:
                  return connection
  
          raise ValueError('Connection for app %r not found' % (app, )f get_connection(self):
          " Return the active Connection instance. "
          app = get_app()
          for connection, client_state in self._client_states.items():
              if client_state.app == app:
                  return connection
  
          raise ValueError('Connection for app %r not found' % (app, ))
docs: Return the active Connection instance.