code: def _check_range(val_range, min_val=None, max_val=None):
      """Check whether the range is a valid range.
  
      Args
          val_range: A pair of lower and upper bound.
          min_val: Minimal value for the lower bound.
          max_val: Maximal value for the upper bound.
      """
      if val_range[0] > val_range[1]:
          raise ValueError("interval lower bound > upper bound")
      if min_val is not None and val_range[0] < min_val:
          raise ValueError("invalid interval lower bound")
      if max_val is not None and val_range[1] > max_val:
          raise ValueError("invalid interval upper bound")
  
imports: from __future__ import division
  import numpy
  import cv2
  from PIL import Image
  from .transform import change_transform_origin
label_desc: Use image node_id 8 for calling a global function with example usage: _check_range(val_range, min_val, max_val) without return types