code: def download_latest_constraint_file(config_params: ConfigParams):
      constraints_url = (
          "https://raw.githubusercontent.com/"
          f"{config_params.constraints_github_repository}/{config_params.default_constraints_branch}/"
          f"{config_params.airflow_constraints_mode}-{config_params.python}.txt"
      )
      # download the latest constraints file
      # download using requests
      console.print(
          f"[bright_blue]Downloading constraints file from {constraints_url}"
      )
      r = requests.get(constraints_url, timeout=60)
      r.raise_for_status()
      with config_params.latest_constraints_file.open(
          "w"
      ) as constraints_file:
          constraints_file.write(r.text)
      console.print(
          f"[green]Downloaded constraints file from {constraints_url} to {constraints_file.name}"
      )
  
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 3 for calling a global function with example usage: download_latest_constraint_file(config_params) without return types