code: def test_quiet_stdio():
      old_stdout, old_stderr = sys.stdout, sys.stderr
  
      class _IOWrapper:
          def __init__(self, name=None):
              self.name = name
              self.content = ""
  
          @staticmethod
          def writable():
              return True
  
          def write(self, d):
              self.content += d
              return len(d)
  
      stdout_w = _IOWrapper("stdout")
      stderr_w = _IOWrapper("stderr")
      executor = ThreadPoolExecutor(1)
      try:
          sys.stdout = stdout_w
          sys.stderr = stderr_w
  
          with utils.quiet_stdio():
              with utils.quiet_stdio():
                  assert sys.stdout.writable()
                  assert sys.stderr.writable()
  
                  print("LINE 1", end="\n")
                  print("LINE 2", file=sys.stderr, end="\n")
                  executor.submit(print, "LINE T").result()
              print("LINE 3", end="\n")
  
          print("LINE 1", end="\n")
          print("LINE 2", file=sys.stderr, end="\n")
      finally:
          sys.stdout, sys.stderr = old_stdout, old_stderr
          executor.shutdown(False)
  
      assert stdout_w.content == "LINE T\nLINE 1\n"
      assert stderr_w.content == "LINE 2\n"
  
imports: import asyncio
  import copy
  import logging
  import multiprocessing
  import os
  import shutil
  import sys
  import tempfile
  import textwrap
  import time
  from concurrent.futures import ThreadPoolExecutor
  from functools import partial
  from io import BytesIO
  from enum import Enum
  import numpy
  import pandas
  import pytest
  from ..None import dataframe
  from ..None import tensor
  from ..None import utils
  from ..core import tile, TileableGraph
  from .core import require_ray, require_cudf
label_desc: Use image node_id 9 for calling a global function with example usage: test_quiet_stdio() and returns: True, len