code: def axis_angle_rotation(axis, angle, point=None, deg=True):
      r"""Return a 4x4 matrix for rotation about any axis by given angle.
  
      Rotations around an axis that contains the origin can easily be
      computed using Rodrigues' rotation formula. The key quantity is
      the ``K`` cross product matrix for the unit vector ``n`` defining
      the axis of the rotation:
  
               /   0  -nz   ny \
          K =  |  nz    0  -nx |
               \ -ny   nx    0 /
  
      For a rotation angle ``phi`` around the vector ``n`` the rotation
      matrix is given by
  
          R = I + sin(phi) K  + (1 - cos(phi)) K^2
  
      where ``I`` is the 3-by-3 unit matrix and ``K^2`` denotes the matrix
      square of ``K``.
  
      If the rotation axis doesn't contain the origin, we have to first
      shift real space to transform the axis' ``p0`` reference point into
      the origin, then shift the points back after rotation:
  
          p' = R @ (p - p0) + p0 = R @ p + (p0 - R @ p0)
  
      This means that the rotation in general consists of a 3-by-3
      rotation matrix ``R``, and a translation given by
      ``b = p0 - R @ p0``. These can be encoded in a 4-by-4 transformation
      matrix by filling the 3-by-3 leading principal submatrix with ``R``,
      and filling the top 3 values in the last column with ``b``.
  
      Parameters
      ----------
      axis : sequence[float]
          The direction vector of the rotation axis. It need not be a
          unit vector, but it must not be a zero vector.
  
      angle : float
          Angle of rotation around the axis. The angle is defined as a
          counterclockwise rotation when facing the normal vector of the
          rotation axis. Passed either in degrees or radians depending on
          the value of ``deg``.
  
      point : sequence[float], optional
          The origin of the rotation (a reference point through which the
          rotation axis passes). By default the rotation axis contains the
          origin.
  
      deg : bool, default: True
          Whether the angle is specified in degrees. ``False`` implies
          radians.
  
      Returns
      -------
      numpy.ndarray
          The ``(4, 4)`` rotation matrix.
  
      Examples
      --------
      Generate a transformation matrix for rotation around a cube's body
      diagonal by 120 degrees.
  
      >>> import numpy as np
      >>> from pyvista import transformations
      >>> trans = transformations.axis_angle_rotation([1, 1, 1], 120)
  
      Check that the transformation cycles the cube's three corners.
  
      >>> corners = np.array(
      ...     [
      ...         [1, 0, 0],
      ...         [0, 1, 0],
      ...         [0, 0, 1],
      ...     ]
      ... )
      >>> rotated = transformations.apply_transformation_to_points(
      ...     trans, corners
      ... )
      >>> np.allclose(rotated, corners[[1, 2, 0], :])
      True
  
      """
      if deg:
          # convert to radians
          angle *= np.pi / 180
  
      # return early for no rotation; play it safe and check only exact equality
      if angle % (2 * np.pi) == 0:
          return np.eye(4)
  
      axis = np.asarray(axis, dtype="float64")
      if axis.shape != (3,):
          raise ValueError("Axis must be a 3-length array-like.")
      if point is not None:
          point = np.asarray(point)
          if point.shape != (3,):
              raise ValueError(
                  "Rotation center must be a 3-length array-like."
              )
  
      # check and normalize
      axis_norm = np.linalg.norm(axis)
      if np.isclose(axis_norm, 0):
          raise ValueError("Cannot rotate around zero vector axis.")
      if not np.isclose(axis_norm, 1):
          axis = axis / axis_norm
  
      # build Rodrigues' rotation matrix
      K = np.zeros((3, 3))
      K[[2, 0, 1], [1, 2, 0]] = axis
      K += -K.T
  
      # the cos and sin functions can introduce some numerical error
      # round the elements to exact values for special cases where we know
      # sin/cos should evaluate exactly to 0 or 1
      sin_angle = np.sin(angle)
      cos_angle = np.cos(angle)
      if angle % (np.pi / 2) == 0:
          cos_angle = round(cos_angle)
          sin_angle = round(sin_angle)
  
      R = np.eye(3) + sin_angle * K + (1 - cos_angle) * K @ K
  
      augmented = np.eye(4)
      augmented[:-1, :-1] = R
  
      if point is not None:
          # rotation of point p would be R @ (p - point) + point
          # which is R @ p + (point - R @ point)
          augmented[:-1, -1] = point - R @ point
  
      return augmented
  
label_desc: Use image node_id 1 for calling a global function with example usage: axis_angle_rotation(axis, angle, point, deg) and returns: augmented, np