code: def compute_transform_coeffs(
      src_coords: List[Tuple[int, int]],
      dst_coords: List[Tuple[float, float]],
  ) -> np.ndarray:
      """
      Given the starting & desired corner coordinates, computes the
      coefficients required by the perspective transform.
      """
      matrix = []
      for sc, dc in zip(src_coords, dst_coords):
          matrix.append(
              [dc[0], dc[1], 1, 0, 0, 0, -sc[0] * dc[0], -sc[0] * dc[1]]
          )
          matrix.append(
              [0, 0, 0, dc[0], dc[1], 1, -sc[1] * dc[0], -sc[1] * dc[1]]
          )
      A = np.matrix(matrix, dtype=float)
      B = np.array(src_coords).reshape(8)
      res = np.dot(np.linalg.inv(A.T * A) * A.T, B)
      return np.array(res).reshape(8)
  
file_path: AugLy/augly/image/utils/utils.py
imports: import functools
  import json
  import math
  import os
  from typing import List, Optional, Tuple, Union
  import numpy
  from augly import utils
  from PIL import Image
label_desc: Use image node_id 10 for calling a global function with example usage: compute_transform_coeffs(src_coords, dst_coords) and returns: np