code: def test_tee_recursion():
      f = io.StringIO()
      g = io.StringIO()
  
      tee = Tee(f, g)
  
      hdlr = logging.StreamHandler(tee)
      util_logger.addHandler(hdlr)
  
      util_logger.info("BEFORE")
      f.close()
      util_logger.info("AFTER")
  
      util_logger.removeHandler(hdlr)
  
file_path: ray/python/ray/tune/tests/test_utils.py
imports: import io
  import logging
  import sys
  import time
  import pytest
  from ray.tune.search.variant_generator import format_vars
  from ray.tune.utils.util import retry_fn, Tee, logger
label_desc: Use image node_id 4 for calling a global function with example usage: test_tee_recursion() without return types