code: def run(self) -> None:
          
          if self.running or self.finished:
              return
          try:
              self.running = True
              while True:
                  future = self.future
                  if future is None:
                      raise Exception("No pending future")
                  if not future.done():
                      return
                  self.future = None
                  try:
                      exc_info = None
  
                      try:
                          value = future.result()
                      except Exception:
                          exc_info = sys.exc_info()
                      future = None
  
                      if exc_info is not None:
                          try:
                              yielded = self.gen.throw(*exc_info)  # type: ignore
                          finally:
                              # Break up a reference to itself
                              # for faster GC on CPython.
                              exc_info = None
                      else:
                          yielded = self.gen.send(value)
  
                  except (StopIteration, Return) as e:
                      self.finished = True
                      self.future = _null_future
                      future_set_result_unless_cancelled(
                          self.result_future, _value_from_stopiteration(e)
                      )
                      self.result_future = None  # type: ignore
                      return
                  except Exception:
                      self.finished = True
                      self.future = _null_future
                      future_set_exc_info(self.result_future, sys.exc_info())
                      self.result_future = None  # type: ignore
                      return
                  if not self.handle_yield(yielded):
                      return
                  yielded = None
          finally:
              self.running = False
docs: Starts or resumes the generator, running until it reaches a
          yield point that is not ready.