code: def validate_argument(
      argument_name: str,
      argument_value: int,
      min_value: Optional[int] = None,
      max_value: Optional[int] = None,
  ):
      """Validates that the argument is >= a min value and/or <= a max value."""
      if min_value is not None and argument_value < min_value:
          raise exceptions.InvalidArgument(
              f"{argument_name} must be >= {min_value} but was set to"
              f" {argument_value}."
          )
  
      if max_value is not None and argument_value > max_value:
          raise exceptions.InvalidArgument(
              f"{argument_name} must be <= {max_value} but was set to"
              f" {argument_value}."
          )
  
file_path: tfx/tfx/dsl/input_resolution/ops/ops_utils.py
imports: from typing import Dict, List, Optional, Sequence, Set
  from tfx import types
  from tfx.orchestration.portable.input_resolution import exceptions
  from tfx.orchestration.portable.mlmd import filter_query_builder
  from tfx.utils import typing_utils
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 2 for calling a global function with example usage: validate_argument(argument_name, argument_value, min_value, max_value) without return types