class_docstr: Wraps subprocess.Popen for a given WorkOrder.
class_docstr_tok: ["Wraps","subprocess.Popen","for","a","given","WorkOrder","."]
code: def cmd(self) -> str:
      cmd: List[str] = []
      if self._work_order.source_cmd is not None:
          cmd.extend([self._work_order.source_cmd, "&&"])
  
      cmd.append(_ENV)
  
      if self._cpu_list is not None:
          cmd.extend(
              [
                  f"GOMP_CPU_AFFINITY={self._cpu_list}",
                  "taskset",
                  "--cpu-list",
                  self._cpu_list,
              ]
          )
  
      cmd.extend(
          [
              _PYTHON,
              WORKER_PATH,
              "--communication-file",
              self._communication_file,
          ]
      )
      return " ".join(cmd)
  
imports: import dataclasses
  import json
  import os
  import pickle
  import signal
  import subprocess
  import time
  import uuid
  from typing import List, Optional, TYPE_CHECKING, Union
  from core.api import AutoLabels
  from core.types import Label
  from core.utils import get_temp_dir
  from worker.main import WORKER_PATH, WorkerFailure, WorkerOutput, WorkerTimerArgs, WorkerUnpickler
label_desc: Use image node_id 3 for calling the _BenchmarkProcess obj's underlying member method code with example usage: obj.cmd() and returns: str