code: def test_very_long_output(wandb_init, capfd, console, numpy):
      # https://wandb.atlassian.net/browse/WB-5437
      with capfd.disabled():
          with mock.patch.object(
              wandb.wandb_sdk.lib.redirect,
              "np",
              wandb.sdk.lib.redirect._Numpy() if not numpy else np,
          ):
              run = wandb_init(
                  settings={
                      "console": console,
                      "mode": "offline",
                      "run_id": runid.generate_id(),
                  }
              )
              run_dir, run_id = run.dir, run.id
              print("LOG" * 1000000)
              print(
                  "\x1b[31m\x1b[40m\x1b[1mHello\x01\x1b[22m\x1b[39m"
                  * 100
              )
              print("===finish===")
              time.sleep(5)
              run.finish()
  
              binary_log_file = (
                  os.path.join(
                      os.path.dirname(run_dir), "run-" + run_id
                  )
                  + ".wandb"
              )
              binary_log = (
                  CliRunner()
                  .invoke(
                      cli.sync, ["--view", "--verbose", binary_log_file]
                  )
                  .stdout
              )
  
              assert "\\033[31m\\033[40m\\033[1mHello" in binary_log
              assert binary_log.count("LOG") == 1000000
              assert "===finish===" in binary_log
  
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 3 for calling a global function with example usage: test_very_long_output(wandb_init, capfd, console, numpy) without return types