code: def compute_middle_image(img):
      """Compute middle image of timeseries (4D data)."""
      img, dim = _check_dims(img)
      if len(dim) == 4 or len(dim) == 5:
          img = image.index_img(img, dim[-1] // 2)
      return img, len(dim)
  
label_desc: Use image node_id 2 for calling a global function with example usage: compute_middle_image(img) and returns: img,  len