code: def _array_clip_val(val):
      """Helper to turn val into array and clip between 0 and 1"""
      val = np.array(val)
      if val.max() > 1 or val.min() < 0:
          logger.warning("value will be clipped between 0 and 1")
      val[...] = np.clip(val, 0, 1)
      return val
  
imports: from __future__ import division
  import numpy
  from copy import deepcopy
  from ..util import logger
  from ._color_dict import _color_dict
  from .color_space import _hex_to_rgba, _rgb_to_hex, _rgb_to_hsv, _hsv_to_rgb, _rgb_to_lab, _lab_to_rgb
label_desc: Use image node_id 3 for calling a global function with example usage: _array_clip_val(val) and returns: val