code: def rotate(M, angle, x, y, z, point=None):
      angle = math.pi * angle / 180
      c, s = math.cos(angle), math.sin(angle)
      n = math.sqrt(x * x + y * y + z * z)
      x /= n
      y /= n
      z /= n
      cx, cy, cz = (1 - c) * x, (1 - c) * y, (1 - c) * z
      R = np.array(
          [
              [cx * x + c, cy * x - z * s, cz * x + y * s, 0],
              [cx * y + z * s, cy * y + c, cz * y - x * s, 0],
              [cx * z - y * s, cy * z + x * s, cz * z + c, 0],
              [0, 0, 0, 1],
          ],
          dtype=M.dtype,
      ).T
      M[...] = np.dot(M, R)
      return M
  
file_path: vispy/examples/gloo/gl/cube.py
imports: import math
  import numpy
  from vispy import app
  from vispy.gloo import gl
label_desc: Use image node_id 2 for calling a global function with example usage: rotate(M, angle, x, y, z, point) and returns: M