class_docstr: This controls a job:
  - instantiate each of the tasks
  - sends timeout signal
  - stops all tasks if one of them finishes
  - cleans up the tasks/closes log files when deleted
class_docstr_tok: ["This","controls","a","job",":","-","instantiate","each","of","the","tasks","-","sends","timeout","signal","-","stops","all","tasks","if","one","of","them","finishes","-","cleans","up","the","tasks\/closes","log","files","when","deleted"]
code: def start_tasks(self) -> None:
      self.folder.mkdir(exist_ok=True)
      paths = [
          utils.JobPaths(self.folder, self.pid, k)
          for k in range(self.ntasks)
      ]
      self.stdouts = [p.stdout.open("a") for p in paths]
      self.stderrs = (
          self.stdouts
          if self.stderr_to_stdout
          else [p.stderr.open("a") for p in paths]
      )
      for k in range(self.ntasks):
          env = dict(os.environ)
          env.update(
              SUBMITIT_LOCAL_LOCALID=str(k),
              SUBMITIT_LOCAL_GLOBALID=str(k),
              SUBMITIT_LOCAL_JOB_ID=self.pid,
          )
          self.tasks.append(
              subprocess.Popen(  # pylint: disable=consider-using-with
                  self.command,
                  shell=False,
                  env=env,
                  stderr=self.stderrs[k],
                  stdout=self.stdouts[k],
                  encoding="utf-8",
              )
          )
  
imports: import os
  import shlex
  import signal
  import subprocess
  import sys
  import time
  import typing
  from pathlib import Path
  from ..core import core, job_environment, logger, utils
  from ..core.core import R
label_desc: Use image node_id 3 for calling the Controller obj's underlying member method code with example usage: obj.start_tasks() without return types