code: def ensure_range(
      lower: int | float, upper: int | float
  ) -> t.Callable[[int | float], bool]:
      """Ensure that given value is within the range of [lower, upper]."""
  
      def v(value: int | float) -> bool:
          return lower <= value <= upper
  
      return v
  
imports: from __future__ import annotations
  import ipaddress
  import logging
  import os
  import re
  import typing
  from functools import singledispatch
  from typing import TYPE_CHECKING
  import schema
  import yaml
  from ...exceptions import BentoMLConfigException
  from ..utils import LazyLoader
label_desc: Use image node_id 11 for calling a global function with example usage: ensure_range(lower, upper) and returns: v, unknown