code: def rotate_box(box_def, angle, origin):
      origin = np.atleast_2d(origin)
      box_def_zeroed = box_def - origin
      cost = math.cos(angle)
      sint = math.sin(angle)
      rot_array = np.array([[cost, -sint], [sint, cost]])
      box_def_zeroed = np.dot(rot_array, box_def_zeroed.T).T
      return box_def_zeroed + origin
  
file_path: nibabel/doc/source/scripts/make_coord_examples.py
imports: import math
  import matplotlib.pyplot
  import nipy
  import nipy.algorithms.resample
  import nipy.core.api
  import numpy
  import numpy.linalg
  import nibabel.eulerangles
label_desc: Use image node_id 4 for calling a global function with example usage: rotate_box(box_def, angle, origin) and returns: unknown