code: def colorize(ls_colors):
      def _colorize(f, spec=""):
          fs_path = {
              "path": f,
              "isexec": "e" in spec,
              "isdir": "d" in spec,
              "isout": "o" in spec,
          }
          return ls_colors.format(fs_path)
  
      return _colorize
  
file_path: dvc/tests/unit/command/ls/test_ls_colors.py
imports: from dvc.commands.ls.ls_colors import LsColors
label_desc: Use image node_id 1 for calling a global function with example usage: colorize(ls_colors) and returns: _colorize, ls_colors