code: def _handle_command(self, command):
          
          logger.info('Handle command %r', command)
  
          def in_executor():
              self.handling_command = True
              try:
                  if self.callback is not None:
                      self.callback(self, command)
              finally:
                  self.server.call_from_executor(done)
  
          def done():
              self.handling_command = False
  
              # Reset state and draw again. (If the connection is still open --
              # the application could have called TelnetConnection.close()
              if not self.closed:
                  self.cli.reset()
                  self.cli.buffers[DEFAULT_BUFFER].reset()
                  self.cli.renderer.request_absolute_cursor_position()
                  self.vt100_output.flush()
                  self.cli._redraw()
  
          self.server.run_in_executor(in_executor)
docs: Handle command. This will run in a separate thread, in order not
          to block the event loop.