code: def _joint_range_check(
      ranged_factor: Tensor,
      name: str,
      bounds: Optional[Tuple[float, float]] = None,
  ) -> None:
      """Check if bounds[0] <= ranged_factor[0] <= ranged_factor[1] <= bounds[1]"""
      if bounds is None:
          bounds = (float("-inf"), float("inf"))
      if ranged_factor.dim() == 1 and len(ranged_factor) == 2:
          if (
              not bounds[0] <= ranged_factor[0]
              or not bounds[1] >= ranged_factor[1]
          ):
              raise ValueError(
                  f"{name} out of bounds. Expected inside {bounds}, got {ranged_factor}."
              )
  
          if (
              not bounds[0]
              <= ranged_factor[0]
              <= ranged_factor[1]
              <= bounds[1]
          ):
              raise ValueError(
                  f"{name}[0] should be smaller than {name}[1] got {ranged_factor}"
              )
      else:
          raise TypeError(
              f"{name} should be a tensor with length 2 whose values between {bounds}. Got {ranged_factor}."
          )
  
file_path: kornia/kornia/augmentation/utils/param_validation.py
imports: from typing import Any, List, Optional, Tuple, Union
  import torch
  from kornia.core import Tensor, as_tensor, tensor
label_desc: Use image node_id 3 for calling a global function with example usage: _joint_range_check(ranged_factor, name, bounds) without return types