code: def affine_points(pt, t):
      ones = np.ones((pt.shape[0], 1), dtype=float)
      pt = np.concatenate([pt, ones], axis=1).T
      new_pt = np.dot(t, pt)
      return new_pt.T
  
imports: import math
  import random
  from typing import Tuple
  import cv2
  import numpy
  import torch
  from torchvision.transforms import functional
  import matplotlib.pyplot
label_desc: Use image node_id 4 for calling a global function with example usage: affine_points(pt, t) and returns: new_pt