code: def log_changes(stats):
      colors = {
          "modified": "yellow",
          "added": "green",
          "deleted": "red",
      }
  
      for state, color in colors.items():
          entries = stats.get(state)
  
          if not entries:
              continue
  
          for entry in entries:
              ui.write(
                  f"[{color}]{state[0].upper()}",
                  entry,
                  styled=True,
                  sep="\t",
              )
  
file_path: dvc/dvc/commands/checkout.py
imports: import operator
  from dvc.cli import completion, formatter
  from dvc.cli.command import CmdBase
  from dvc.cli.utils import append_doc_link
  from dvc.exceptions import CheckoutError
  from dvc.ui import ui
label_desc: Use image node_id 1 for calling a global function with example usage: log_changes(stats) without return types