code: def diff_constraints(config_params: ConfigParams) -> None:
      """
      Diffs constraints files and prints the diff to the console.
      """
      console.print("[bright_blue]Diffing constraints files")
      result = run_command(
          [
              "diff",
              "--ignore-matching-lines=#",
              "--color=always",
              config_params.latest_constraints_file.as_posix(),
              config_params.current_constraints_file.as_posix(),
          ],
          # always shows output directly in CI without folded group
          github_actions=False,
          check=False,
      )
      if result.returncode == 0:
          console.print(
              "[green]No changes in constraints files. exiting"
          )
          config_params.constraints_diff_file.unlink(missing_ok=True)
          return
      result = run_command(
          [
              "diff",
              "--ignore-matching-lines=#",
              "--color=never",
              config_params.latest_constraints_file.as_posix(),
              config_params.current_constraints_file.as_posix(),
          ],
          github_actions=config_params.github_actions,
          check=False,
          text=True,
          capture_output=True,
      )
      with config_params.constraints_diff_file.open("w") as diff_file:
          diff_file.write(
              f"Dependencies {config_params.airflow_constraints_mode} updated "
              f"for Python {config_params.python}\n\n"
          )
          diff_file.write("```diff\n")
          diff_file.write(result.stdout)
          diff_file.write("```\n")
      console.print(
          f"[green]Diff generated to file: {config_params.constraints_diff_file}"
      )
  
imports: from __future__ import annotations
  import json
  import os
  import sys
  from dataclasses import dataclass
  from datetime import datetime
  from functools import cached_property
  from pathlib import Path
  from typing import TextIO
  import requests
  from click import Choice
  from in_container_utils import click, console, run_command
label_desc: Use image node_id 4 for calling a global function with example usage: diff_constraints(config_params) without return types