code: def rotate(angle, axis, dtype=None):
      """The 4x4 rotation matrix for rotation about a vector.
  
      Parameters
      ----------
      angle : float
          The angle of rotation, in degrees.
      axis : ndarray
          The x, y, z coordinates of the axis direction vector.
  
      Returns
      -------
      M : ndarray
          Transformation matrix describing the rotation.
      """
      angle = np.radians(angle)
      assert len(axis) == 3
      x, y, z = axis / np.linalg.norm(axis)
      c, s = math.cos(angle), math.sin(angle)
      cx, cy, cz = (1 - c) * x, (1 - c) * y, (1 - c) * z
      M = np.array(
          [
              [cx * x + c, cy * x - z * s, cz * x + y * s, 0.0],
              [cx * y + z * s, cy * y + c, cz * y - x * s, 0.0],
              [cx * z - y * s, cy * z + x * s, cz * z + c, 0.0],
              [0.0, 0.0, 0.0, 1.0],
          ],
          dtype,
      ).T
      return M
  
file_path: vispy/vispy/util/transforms.py
imports: from __future__ import division
  import math
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: rotate(angle, axis, dtype) and returns: M