code: def test_show_colors(mocker, capsys, monkeypatch):
      cli_args = parse_args(["list", "local_dir"])
      assert cli_args.func == CmdList
      cmd = cli_args.func(cli_args)
  
      monkeypatch.setenv(
          "LS_COLORS", "ex=01;32:rs=0:di=01;34:*.xml=01;31:*.dvc=01;33:"
      )
      result = [
          {
              "isdir": False,
              "isexec": 0,
              "isout": False,
              "path": ".dvcignore",
          },
          {
              "isdir": False,
              "isexec": 0,
              "isout": False,
              "path": ".gitignore",
          },
          {
              "isdir": False,
              "isexec": 0,
              "isout": False,
              "path": "README.md",
          },
          {"isdir": True, "isexec": 0, "isout": True, "path": "data"},
          {
              "isdir": False,
              "isexec": 0,
              "isout": True,
              "path": "structure.xml",
          },
          {
              "isdir": False,
              "isexec": 0,
              "isout": False,
              "path": "structure.xml.dvc",
          },
          {"isdir": True, "isexec": 0, "isout": False, "path": "src"},
          {
              "isdir": False,
              "isexec": 1,
              "isout": False,
              "path": "run.sh",
          },
      ]
      mocker.patch("dvc.repo.Repo.ls", return_value=result)
  
      assert cmd.run() == 0
      out, _ = capsys.readouterr()
      entries = out.splitlines()
  
      assert entries == [
          ".dvcignore",
          ".gitignore",
          "README.md",
          "\x1b[01;34mdata\x1b[0m",
          "\x1b[01;31mstructure.xml\x1b[0m",
          "\x1b[01;33mstructure.xml.dvc\x1b[0m",
          "\x1b[01;34msrc\x1b[0m",
          "\x1b[01;32mrun.sh\x1b[0m",
      ]
  
file_path: dvc/tests/unit/command/ls/test_ls.py
imports: import json
  from dvc.cli import parse_args
  from dvc.commands.ls import CmdList
label_desc: Use image node_id 9 for calling a global function with example usage: test_show_colors(mocker, capsys, monkeypatch) without return types