code: def rotate_4d(img, r_plane, angle, order=1, cval=0):
      """
      rotate 4D image by r_plane and angle.
      r_plane (2-list): rotate planes by axis, i.e, [0, 1] or [1, 2] or [0, 2]
      angle (int): rotate degrees
      """
      img = scipy.ndimage.rotate(
          img,
          angle=angle,
          axes=tuple(r_plane),
          order=order,
          cval=cval,
          reshape=False,
      )
      return img
  
imports: from typing import List, Tuple, Union, Callable
  import collections
  import numbers
  import random
  import numpy
  import scipy
  import scipy.ndimage
  import SimpleITK
  from scipy.ndimage.filters import gaussian_filter, gaussian_gradient_magnitude
  from skimage.transform import resize
label_desc: Use image node_id 8 for calling a global function with example usage: rotate_4d(img, r_plane, angle, order, cval) and returns: img