def METHOD_NAME(
    self, frame, landmarks, transform, target_size, interpolation, border_mode, border_value
):
    transformed_frame = cv2.warpAffine(
        frame,
        transform,
        dsize=(target_size[0], target_size[1]),
        flags=interpolation,
        borderMode=border_mode,
        borderValue=border_value,
    )
    transformed_landmarks = np.matmul(landmarks, transform[:, :2].transpose()) + transform[:, 2].transpose()
    return transformed_frame, transformed_landmarks