code: def test_memory_leak2(wandb_init, capfd, console):
      # map to old style wrap implementation until test is refactored
      if console == "wrap":
          console = "wrap_emu"
      with capfd.disabled():
          run = wandb_init(settings={"console": console})
          for _ in range(1000):
              print("ABCDEFGH")
          time.sleep(3)
          assert len(run._out_redir._emulator.buffer) < 1000
          run.finish()
  
file_path: wandb/tests/pytest_tests/system_tests/test_core/test_redir_full.py
imports: import os
  import re
  import time
  from unittest import mock
  import numpy
  import pytest
  import tqdm
  import wandb
  import wandb.sdk.lib.redirect
  import wandb.util
  from click.testing import CliRunner
  from wandb.cli import cli
  from wandb.sdk.lib import runid
label_desc: Use image node_id 5 for calling a global function with example usage: test_memory_leak2(wandb_init, capfd, console) without return types