class_docstr: Helper for mocking subprocess calls
code: def __init__(
      self, known_cmds: tp.Optional[tp.Sequence[str]] = None
  ) -> None:
      self.job_sacct: tp.Dict[str, str] = {}
      self.last_job: str = ""
      self._subprocess_check_output = subprocess.check_output
      self.known_cmds = known_cmds or []
      self.job_count = 12
  
imports: import contextlib
  import pickle
  import subprocess
  import sys
  import time
  import typing
  from pathlib import Path
  from unittest.mock import patch
  import pytest
  from .None import core, submission, utils
label_desc: Use image node_id 1 to create a new MockedSubprocess object  with example: obj = MockedSubprocess(known_cmds)