code: def extern_generator_send(self, context_handle, func, arg):
      
      c = self._ffi.from_handle(context_handle)
      response = self._ffi.new('PyGeneratorResponse*')
      try:
        res = c.from_value(func[0]).send(c.from_value(arg[0]))
        if isinstance(res, Get):
          # Get.
          response.tag = self._lib.Get
          response.get = (
              TypeId(c.to_id(res.product)),
              c.to_value(res.subject),
              c.identify(res.subject),
            )
        elif type(res) in (tuple, list):
          # GetMulti.
          response.tag = self._lib.GetMulti
          response.get_multi = (
              c.type_ids_buf([TypeId(c.to_id(g.product)) for g in res]),
              c.vals_buf([c.to_value(g.subject) for g in res]),
              c.identities_buf([c.identify(g.subject) for g in res]),
            )
        else:
          # Break.
          response.tag = self._lib.Broke
          response.broke = (c.to_value(res),)
      except Exception as e:
        # Throw.
        response.tag = self._lib.Throw
        val = e
        val._formatted_exc = traceback.format_exc()
        response.throw = (c.to_value(val),)
  
      return response[0]
docs: Given a generator, send it the given value and return a response.