code: def intensity_range(image, range_values="image", clip_negative=False):
      """Return image intensity range (min, max) based on desired value type.
  
      Parameters
      ----------
      image : array
          Input image.
      range_values : str or 2-tuple, optional
          The image intensity range is configured by this parameter.
          The possible values for this parameter are enumerated below.
  
          'image'
              Return image min/max as the range.
          'dtype'
              Return min/max of the image's dtype as the range.
          dtype-name
              Return intensity range based on desired `dtype`. Must be valid key
              in `DTYPE_RANGE`. Note: `image` is ignored for this range type.
          2-tuple
              Return `range_values` as min/max intensities. Note that there's no
              reason to use this function if you just want to specify the
              intensity range explicitly. This option is included for functions
              that use `intensity_range` to support all desired range types.
  
      clip_negative : bool, optional
          If True, clip the negative range (i.e. return 0 for min intensity)
          even if the image dtype allows negative values.
      """
      if range_values == "dtype":
          range_values = image.dtype.type
  
      if range_values == "image":
          i_min = np.min(image)
          i_max = np.max(image)
      elif range_values in DTYPE_RANGE:
          i_min, i_max = DTYPE_RANGE[range_values]
          if clip_negative:
              i_min = 0
      else:
          i_min, i_max = range_values
      return i_min, i_max
  
imports: import numpy
  from warnings import warn
label_desc: Use image node_id 1 for calling a global function with example usage: intensity_range(image, range_values, clip_negative) and returns: i_min,  i_max