class_docstr: Helper for mocking subprocess calls
code: def mock_cmd_fn(self, *args, **_):
      # CommandFunction(cmd)() ~= subprocess.check_output(cmd)
      return lambda: self(*args)
  
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 9 for calling the MockedSubprocess obj's underlying member method code with example usage: obj.mock_cmd_fn() and returns: function