code: def check_sanity(pool, verbose=False):
      if verbose:
          print(pool)
          print("x: %s\n" % str(x))
  
          print(pool.map.__name__)
      # blocking map
      start = time.time()
      res = pool.map(squared, x)
      end = time.time() - start
      assert res == x2
      if verbose:
          print("time to results: %s" % end)
          print("y: %s\n" % str(res))
  
          print(pool.imap.__name__)
      # iterative map
      start = time.time()
      res = pool.imap(squared, x)
      fin = time.time() - start
      # get result from iterator
      start = time.time()
      res = list(res)
      end = time.time() - start
      assert res == x2
      if verbose:
          print("time to queue: %s" % fin)
          print("time to results: %s" % end)
          print("y: %s\n" % str(res))
  
          print(pool.amap.__name__)
      # asyncronous map
      start = time.time()
      res = pool.amap(squared, x)
      fin = time.time() - start
      # get result from result object
      start = time.time()
      res = res.get()
      end = time.time() - start
      assert res == x2
      if verbose:
          print("time to queue: %s" % fin)
          print("time to results: %s" % end)
          print("y: %s\n" % str(res))
  
file_path: pathos/pathos/tests/test_star.py
imports: import time
label_desc: Use image node_id 5 for calling a global function with example usage: check_sanity(pool, verbose) without return types