code: def test_reinstall(cls, capfd):
      with capfd.disabled():
          o1, o2 = CapList(), CapList()
          r1 = cls("stdout", cbs=[o1.append])
          r2 = cls("stdout", cbs=[o2.append])
          r1.install()
          print("ABCD")
          r2.install()
          print("WXYZ")
          r1.install()
          print("1234")
          r2.install()
          print("5678")
          r2.uninstall()
          assert o1 == [b"ABCD", b"1234"]
          assert o2 == [b"WXYZ", b"5678"]
  
imports: import os
  import re
  import sys
  import time
  import numpy
  import pytest
  import tqdm
  import wandb
label_desc: Use image node_id 2 for calling a global function with example usage: test_reinstall(cls, capfd) without return types