code: def test_redirect_stdout_stderr(executor) -> None:
      def log_to_stderr_and_stdout():
          print("hello")
          print("world", file=sys.stderr)
  
      executor.update_parameters(stderr_to_stdout=True)
      job = executor.submit(log_to_stderr_and_stdout)
      job.wait()
      assert job.stderr() is None
      stdout = job.stdout()
      assert "hello" in stdout
      assert "world" in stdout
  
      executor.update_parameters(stderr_to_stdout=False)
      job = executor.submit(log_to_stderr_and_stdout)
      job.wait()
      assert "world" in job.stderr()
      assert "hello" in job.stdout()
  
file_path: submitit/submitit/auto/test_auto.py
imports: import sys
  from pathlib import Path
  import pytest
  from ..local import debug
  from ..slurm import test_slurm
  from .None import auto
label_desc: Use image node_id 10 for calling a global function with example usage: test_redirect_stdout_stderr(executor) without return types