code: def rotation(cls, angle, pivot=None):
          
          ca, sa = cos_sin_deg(angle)
          if pivot is None:
              return tuple.__new__(cls, (ca, sa, 0.0, -sa, ca, 0.0, 0.0, 0.0, 1.0))
          else:
              px, py = pivot
              return tuple.__new__(
                  cls,
                  (
                      ca,
                      sa,
                      px - px * ca + py * sa,
                      -sa,
                      ca,
                      py - px * sa - py * ca,
                      0.0,
                      0.0,
                      1.0,
                  ),
              )
docs: Create a rotation transform at the specified angle,
          optionally about the specified pivot point.
  
          :param angle: Rotation angle in degrees
          :type angle: float
          :param pivot: Point to rotate about, if omitted the
              rotation is about the origin.
          :type pivot: sequence
          :rtype: Affine