code: def get_package_with_constraint(
      package_name, build_metadata, uses_pip=False
  ):
      build_package_constraints = build_metadata.get(
          "package_constraints"
      )
      if build_package_constraints is None:
          constraint = None
      else:
          constraint = build_package_constraints.get(package_name)
  
      constraint = constraint or default_package_constraints.get(
          package_name
      )
  
      if constraint is None:
          return package_name
  
      comment = ""
      if constraint == "min":
          constraint = execute_command(
              [
                  sys.executable,
                  "sklearn/_min_dependencies.py",
                  package_name,
              ]
          ).strip()
          comment = "  # min"
  
      if re.match(r"\d[.\d]*", constraint):
          equality = "==" if uses_pip else "="
          constraint = equality + constraint
  
      return f"{package_name}{constraint}{comment}"
  
imports: import json
  import logging
  import re
  import shlex
  import subprocess
  import sys
  from importlib.metadata import version
  from pathlib import Path
  import click
  from jinja2 import Environment
  from packaging.version import Version
label_desc: Use image node_id 3 for calling a global function with example usage: get_package_with_constraint(package_name, build_metadata, uses_pip) and returns: package_name, constraint, comment, package_name