code: def test_cursor(cls, capfd):
      with capfd.disabled():
          o = CapList()
          r = cls("stdout", cbs=[o.append])
          r.install()
          s = "ABCD\nEFGH\nIJKX\nMNOP"
          s += "\x1b[1A"
          s += "\x1b[1D"
          s += "L"
          s += "\x1b[1B"
          s += "\r"
          s += "\x1b[K"
          s += "QRSD"
          s += "\x1b[1D"
          s += "\x1b[1C"
          s += "\x1b[1D"
          s += "T"
          s += "\x1b[4A"
          s += "\x1b[1K"
          s += "\r"
          s += "1234"
          s += "\x1b[4B"
          s += "\r"
          s += "WXYZ"
          s += "\x1b[2K"
          print(s)
          r.uninstall()
          assert o == [b"1234", b"EFGH", b"IJKL", b"QRST"]
  
imports: import os
  import re
  import sys
  import time
  import numpy
  import pytest
  import tqdm
  import wandb
label_desc: Use image node_id 5 for calling a global function with example usage: test_cursor(cls, capfd) without return types