code: def get_rotation_matrix(width, height, thetaX=0, thetaY=0, thetaZ=0):
      """Provide a rotation matrix about the center of a rectangle with
      a given width and height.
  
      Args:
          width: The width of the rectangle
          height: The height of the rectangle
          thetaX: Rotation about the X axis
          thetaY: Rotation about the Y axis
          thetaZ: Rotation about the Z axis
  
      Returns:
          A 3x3 transformation matrix
      """
      translate1 = np.array(
          [[1, 0, width / 2], [0, 1, height / 2], [0, 0, 1]]
      )
      rotX = np.array(
          [
              [1, 0, 0],
              [0, np.cos(thetaX), -np.sin(thetaX)],
              [0, np.sin(thetaX), np.cos(thetaX)],
          ]
      )
      rotY = np.array(
          [
              [np.cos(thetaY), 0, np.sin(thetaY)],
              [0, 1, 0],
              [-np.sin(thetaY), 0, np.cos(thetaY)],
          ]
      )
      rotZ = np.array(
          [
              [np.cos(thetaZ), -np.sin(thetaZ), 0],
              [np.sin(thetaZ), np.cos(thetaZ), 0],
              [0, 0, 1],
          ]
      )
      translate2 = np.array(
          [[1, 0, -width / 2], [0, 1, -height / 2], [0, 0, 1]]
      )
      M = translate1.dot(rotX).dot(rotY).dot(rotZ).dot(translate2)
      return M
  
imports: import os
  import math
  import glob
  import typing
  import random
  import zipfile
  import string
  import itertools
  import cv2
  import tqdm
  import numpy
  import essential_generators
  import PIL.Image
  import PIL.ImageDraw
  import PIL.ImageFont
  import fontTools.ttLib
  from .None import tools
label_desc: Use image node_id 1 for calling a global function with example usage: get_rotation_matrix(width, height, thetaX, thetaY, thetaZ) and returns: M