code: def test_command_function_deadlock(executor) -> None:
      code = """
  import sys;
  print(sys.__stderr__)
  # The goal here is to fill up the stderr pipe buffer.
  for i in range({n}):
      print("-" * 1024, file=sys.stdout)
  print("printed {n} lines to stderr")
  """
      fn1 = utils.CommandFunction(
          [sys.executable, "-c", code.format(n=10)]
      )
      executor.update_parameters(timeout_min=2 / 60)
      j1 = executor.submit(fn1)
      assert "10 lines" in j1.result()
  
      fn2 = utils.CommandFunction(["python", "-c", code.format(n=1000)])
      j2 = executor.submit(fn2)
      assert "1000 lines" in j2.result()
  
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 9 for calling a global function with example usage: test_command_function_deadlock(executor) without return types