code: def get_bounds(shape, affine):
      """Return the world-space bounds occupied by an array given an affine."""
      adim, bdim, cdim = shape
      adim -= 1
      bdim -= 1
      cdim -= 1
      # form a collection of vectors for each 8 corners of the box
      box = np.array(
          [
              [0.0, 0, 0, 1],
              [adim, 0, 0, 1],
              [0, bdim, 0, 1],
              [0, 0, cdim, 1],
              [adim, bdim, 0, 1],
              [adim, 0, cdim, 1],
              [0, bdim, cdim, 1],
              [adim, bdim, cdim, 1],
          ]
      ).T
      box = np.dot(affine, box)[:3]
      return list(zip(box.min(axis=-1), box.max(axis=-1)))
  
imports: import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: get_bounds(shape, affine) and returns: list