input: 
  def perform_matrix_operations(matrix1_data: List[List[int]], matrix2_data: List[List[int]]) -> List[List[int]]:
      """Perform matrix addition, subtraction, multiplication, and transpose operations on the given matrices.
      The function should return the result of matrix addition, subtraction, multiplication, and transpose of the first matrix.
      >>> perform_matrix_operations([[1, 2], [3, 4]], [[5, 6], [7, 8]])
      [[6, 8], [-4, -4], [19, 22], [[1, 3], [2, 4]]]
      >>> perform_matrix_operations([[1, 2], [3, 4]], [[1, 2], [3, 4]])
      [[2, 4], [0, 0], [7, 10], [[1, 3], [2, 4]]]
      """
  
output:     rows1, cols1 = len(matrix1_data), len(matrix1_data[0])
      rows2, cols2 = len(matrix2_data), len(matrix2_data[0])
      
      # Matrix addition
      add_result = [[matrix1_data[i][j] + matrix2_data[i][j] for j in range(cols1)] for i in range(rows1)]
      
      # Matrix subtraction
      sub_result = [[matrix1_data[i][j] - matrix2_data[i][j] for j in range(cols1)] for i in range(rows1)]
      
      # Matrix multiplication
      mul_result = [[sum(matrix1_data[i][k] * matrix2_data[k][j] for k in range(cols1)) for j in range(cols2)] for i in range(rows1)]
      
      # Matrix transpose of the first matrix
      transpose_result = [[matrix1_data[j][i] for j in range(rows1)] for i in range(cols1)]
      
      return [add_result, sub_result, mul_result, transpose_result]