def __init__(self,
      task,
      parallel=False,
      num_workers=0,
      chunk=80,
      servers = None,
      module_deps = None,
      function_deps = None,
      verbose = False):
    """ Create an instance of the Task Runner class.

    If parallel is False, the `task` is run on the args (see __call__).  Else,

    Else, `num_workers` are created, and the first element of args (which should
    be an iterable) is chunked into `chunk` sizes. If `num_workers` is 0, it
    is auto detected.

    `module_deps` are a tuple of modules that the task depends on.
    `function_deps` are a tuple of functions that the task depends on.
    """

    self.task = task
    self.parallel = parallel

    self.num_workers = num_workers or "autodetect"
    self.servers = servers or ()
    self.chunk = chunk

    if function_deps:
      self.function_deps = tuple(function_deps)
    else:
      self.function_deps = ()

    if module_deps:
      self.module_deps = tuple(module_deps)
    else:
      self.module_deps = ()

    self.verbose = verbose

    if parallel:
      try:
        import pp
      except __HOLE__ as e:
        sys.stderr.write(pp_not_found_error)
        sys.exit(1)

      self.pp = pp
    return
dataset/ETHPy150Open spranesh/Redhawk/redhawk/utils/task_runner.py/TaskRunner.__init__