code: def test_command_function() -> None:
      # This will call `submitit.core.test_core.do_nothing`
      command = [sys.executable, "-m", "submitit.core.test_core"]
      word = "testblublu12"
      output = utils.CommandFunction(command)(word)
      assert output is not None
      assert word in output
      with pytest.raises(utils.FailedJobError, match="Too bad"):
          # error=True will make `do_nothing` fail
          utils.CommandFunction(command, verbose=True)(error=True)
  
file_path: submitit/submitit/core/test_utils.py
imports: import os
  import shutil
  import sys
  from pathlib import Path
  from typing import Optional
  import pytest
  from .None import utils
label_desc: Use image node_id 8 for calling a global function with example usage: test_command_function() without return types