code: def add_z(xy: np.ndarray, z: float) -> np.ndarray:
      
      # First, insert a column of zeros as into the input matrix
      interm = insert(xy, 2, [0, 0, 0], axis=1)
      # Result:
      # [ 1  0  0  x ]
      # [ 0  1  0  y ]
      # [ 0  0  0  1 ]
  
      # Then, insert the z row to create a properly formed 3-D transform matrix:
      xyz = insert(
          interm,
          2,
          [0, 0, 1, z],
          axis=0)
      # Result:
      # [ 1  0  0  x ]
      # [ 0  1  0  y ]
      # [ 0  0  1  z ]
      # [ 0  0  0  1 ]
  
      return xyz.round(11)
docs: Turn a 2-D transform matrix into a 3-D transform matrix (scale/shift only,
      no rotation).
  
      :param xy: A two-dimensional transform matrix (a 3x3 numpy ndarray) in the
          following form:
              [ 1  0  x ]
              [ 0  1  y ]
              [ 0  0  1 ]
      :param z: a float for the z component
      :return: a three-dimensional transformation matrix (a 4x4 numpy ndarray)
          with x, y, and z from the function parameters, in the following form:
              [ 1  0  0  x ]
              [ 0  1  0  y ]
              [ 0  0  1  z ]
              [ 0  0  0  1 ]