code: def _prepare_colorarray(arr):
      """Check the shape of the array and convert it to
      floating point representation.
      """
      arr = np.asanyarray(arr)
  
      if arr.ndim not in [3, 4] or arr.shape[-1] != 3:
          msg = (
              "the input array must be have a shape == (.., ..,[ ..,] 3)), "
              + "got ("
              + (", ".join(map(str, arr.shape)))
              + ")"
          )
          raise ValueError(msg)
  
      return img_as_float(arr)
  
imports: import numpy
  from scipy import linalg
  from warnings import warn
label_desc: Use image node_id 9 for calling a global function with example usage: _prepare_colorarray(arr) and returns: img_as_float