code: def _constrain(min_v, max_v, value):
      if value < min_v:
          return min_v
  
      if value > max_v:
          return max_v
  
      return value
  
file_path: ImageAI/imageai_tf_deprecated/Detection/Custom/utils/image.py
imports: import cv2
  import numpy
  import copy
label_desc: Use image node_id 2 for calling a global function with example usage: _constrain(min_v, max_v, value) and returns: value, min_v, max_v