code: def set_output_redirected(val: bool):
      """Choose between logging to a temporary file and to `sys.stdout`.
  
      The default is to log to a file.
  
      Args:
          val: If true, subprocess output will be redirected to
                      a temporary file.
      """
      global _redirect_output
      _redirect_output = val
  
file_path: ray/python/ray/autoscaler/_private/subprocess_output_util.py
imports: import os
  import re
  import subprocess
  import sys
  import tempfile
  import time
  from ray.autoscaler._private.cli_logger import cf, cli_logger
label_desc: Use image node_id 2 for calling a global function with example usage: set_output_redirected(val) without return types