code: def end(target):
      
      if not isinstance(target, compat.greenlet):
          raise TypeError("argument must be a greenlet")
      if not target.dead:
          schedule(target)
          state.to_raise[target] = compat.GreenletExit()
docs: schedule a greenlet to be stopped immediately
  
      :param target: the greenlet to end
      :type target: greenlet