code: def _stop(evt):
      """simple wrapper for stopping an Event, allowing for method rename in gevent 1.0"""
      try:
          evt.stop()
      except AttributeError as e:
          # gevent<1.0 compat
          evt.cancel()
  
imports: from __future__ import print_function
  import sys
  import time
  import warnings
  import zmq
  from zmq import Context
  from zmq import Socket
  from .poll import _Poller
  import gevent
  from gevent.event import AsyncResult
  from gevent.hub import get_hub
label_desc: Use image node_id 1 for calling a global function with example usage: _stop(evt) without return types