code: def capture():
      sys.stdout.write = _write_stdout
      sys.stderr.write = _write_stderr
  
imports: import sys
  import threading
  import time
  from io import StringIO
  from typing import Optional
  from labml.internal.app import AppTracker, AppTrackDataSource, Packet
label_desc: Use image node_id 3 for calling a global function with example usage: capture() without return types