code: def authenticate(self, callback=None):
          '''
          Ask for this client to reconnect to the origin
  
          This function will de-dupe all calls here and return a *single* future
          for the sign-in-- whis way callers can all assume there aren't others
          '''
          # if an auth is in flight-- and not done-- just pass that back as the future to wait on
          if hasattr(self, '_authenticate_future') and not self._authenticate_future.done():
              future = self._authenticate_future
          else:
              future = tornado.concurrent.Future()
              self._authenticate_future = future
              self.io_loop.add_callback(self._authenticate)
  
          if callback is not None:
              def handle_future(future):
                  response = future.result()
                  self.io_loop.add_callback(callback, response)
              future.add_done_callback(handle_future)
  
          return futurf authenticate(self, callback=None):
          '''
          Ask for this client to reconnect to the origin
  
          This function will de-dupe all calls here and return a *single* future
          for the sign-in-- whis way callers can all assume there aren't others
          '''
          # if an auth is in flight-- and not done-- just pass that back as the future to wait on
          if hasattr(self, '_authenticate_future') and not self._authenticate_future.done():
              future = self._authenticate_future
          else:
              future = tornado.concurrent.Future()
              self._authenticate_future = future
              self.io_loop.add_callback(self._authenticate)
  
          if callback is not None:
              def handle_future(future):
                  response = future.result()
                  self.io_loop.add_callback(callback, response)
              future.add_done_callback(handle_future)
  
          return future
docs: Ask for this client to reconnect to the origin
  
          This function will de-dupe all calls here and return a *single* future
          for the sign-in-- whis way callers can all assume there aren't others