code: def _gevent_patch():
      
      try:
          assert gevent
          assert grequests
      except NameError:
          logger.warn('gevent not exist, fallback to multiprocess...')
          return MULTITHREAD
      else:
          monkey.patch_all()  # Must patch before get_photos_info
          return GEVENT
docs: Patch the modules with gevent
  
      :return: Default is GEVENT. If it not supports gevent then return MULTITHREAD
      :rtype: int