def crop_and_paste(
        img1: np.ndarray,
        mask1: np.ndarray,
        img2: np.ndarray,
        mask2: np.ndarray,
        angle: float,
        x: float,
        y: float,
        dx: float,
        dy: float,
        ratio: float,
    ) -> Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, float]:
        """
        Crop and paste one image onto another image while considering rotation, resizing, and color fill.

        Args:
            img1 (np.ndarray): The first input image.
            mask1 (np.ndarray): The mask corresponding to img1.
            img2 (np.ndarray): The second input image.
            mask2 (np.ndarray): The mask corresponding to img2.
            angle (float): The rotation angle for img1.
            x (float): The x-coordinate of the center point for transformation.
            y (float): The y-coordinate of the center point for transformation.
            dx (float, otional): the pixel of horizontal move for img1 (default is 0.0).
            dy (float, otional): the pixel of vertical move for img1 (default is 0.0).
            ratio (float): The scaling ratio for img1.

        Returns:
            Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, float]:
                - The resulting merged image.
                - The processed img1.
                - The processed img2.
                - The processed mask1.
                - The processed mask2.
                - The Intersection over Union (IoU) value.
        """
        # Rotate and resize img1 and mask1
        img1 = rotate_resize_image(img1, angle, ratio, dx, dy)
        mask1 = rotate_resize_image(mask1, angle, ratio, dx, dy)

        # Paste img1 onto img2, considering masks
        result_img, img1, img2, mask1, mask2, iou = merge_images(img1, img2, mask1, mask2, x, y)

        return result_img, img1, img2, mask1, mask2, iou

        Crop and paste one image onto another image while considering rotation, resizing, and color fill.

        Args:
            img1 (np.ndarray): The first input image.
            mask1 (np.ndarray): The mask corresponding to img1.
            img2 (np.ndarray): The second input image.
            mask2 (np.ndarray): The mask corresponding to img2.
            angle (float): The rotation angle for img1.
            x (float): The x-coordinate of the center point for transformation.
            y (float): The y-coordinate of the center point for transformation.
            dx (float, otional): the pixel of horizontal move for img1 (default is 0.0).
            dy (float, otional): the pixel of vertical move for img1 (default is 0.0).
            ratio (float): The scaling ratio for img1.

        Returns:
            Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, float]:
                - The resulting merged image.
                - The processed img1.
                - The processed img2.
                - The processed mask1.
                - The processed mask2.
                - The Intersection over Union (IoU) value.
        
scripts/easyphoto_utils/tryon_utils.py