code: def set_result(self, key, result):
          
          self.results[key] = result
          if self.yield_point is not None and self.yield_point.is_ready():
              try:
                  self.future.set_result(self.yield_point.get_result())
              except:
                  self.future.set_exc_info(sys.exc_info())
              self.yield_point = None
              self.run()
docs: Sets the result for ``key`` and attempts to resume the generator.