code: def threaded_per_region(q, params):
      
      while True:
          try:
              params['region'] = q.get()
              method = params['method']
              method(params)
          except Exception as e:
              printException(e)
          finally:
              q.task_done()
docs: Helper for multithreading on a per-region basis
  
      :param q:
      :param params:
  
      :return: