class_docstr: Manages running threads and processes of a Launchpad Program.
class_docstr_tok: ["Manages","running","threads","and","processes","of","a","Launchpad","Program","."]
docstr: Adds process worker to the runtime.
  
  Args:
    name: Name of the worker's group.
    command: Command to execute in the worker.
    env: Environment variables to set for the worker.
    **kwargs: Other parameters to be passed to `subprocess.Popen`.
docstr_tok: ["Adds","process","worker","to","the","runtime",".","Args",":","name",":","Name","of","the","worker","'s","group",".","command",":","Command","to","execute","in","the","worker",".","env",":","Environment","variables","to","set","for","the","worker",".","*","*","kwargs",":","Other","parameters","to","be","passed","to","`","subprocess.Popen","`","."]
code: def process_worker(
      self,
      name,
      command,
      env: Optional[Mapping[str, Any]] = None,
      **kwargs,
  ):
      """Adds process worker to the runtime.
  
      Args:
        name: Name of the worker's group.
        command: Command to execute in the worker.
        env: Environment variables to set for the worker.
        **kwargs: Other parameters to be passed to `subprocess.Popen`.
      """
      with self._mutex:
          process = subprocess.Popen(command, env=env or {}, **kwargs)
          self._process_workers[name].append(
              psutil.Process(process.pid)
          )
  
imports: import collections
  from concurrent import futures
  import dataclasses
  import functools
  import signal
  import subprocess
  import threading
  import time
  from typing import Any, Callable, Iterable, List, Mapping, MutableMapping, Optional, Sequence, Tuple
  from absl import logging
  from launchpad import flags
  import psutil
  import termcolor
label_desc: Use image node_id 6 for calling the WorkerManager obj's underlying member method code with example usage: obj.process_worker(name, command, env) without return types