def paste_image_center(img1: np.ndarray, img2: np.ndarray) -> np.ndarray:
        """
        Paste img1 at the center of img2.

        Args:
            img1 (np.ndarray): The image to paste.
            img2 (np.ndarray): The target image.

        Returns:
            np.ndarray: The resulting image.
        """
        h1, w1 = img1.shape[:2]
        h2, w2 = img2.shape[:2]

        # Calculate the coordinates to place img1 at the center of img2
        paste_x = (w2 - w1) // 2
        paste_y = (h2 - h1) // 2

        # Ensure img1 is within the bounds of img2
        paste_x = max(0, paste_x)
        paste_y = max(0, paste_y)
        paste_x = min(paste_x, w2 - w1)
        paste_y = min(paste_y, h2 - h1)

        # Create an empty result image
        result_img = img2.copy()

        # Paste img1 onto result_img using the calculated coordinates
        result_img[paste_y : paste_y + h1, paste_x : paste_x + w1] = img1

        return result_img

        Paste img1 at the center of img2.

        Args:
            img1 (np.ndarray): The image to paste.
            img2 (np.ndarray): The target image.

        Returns:
            np.ndarray: The resulting image.
        
scripts/easyphoto_utils/tryon_utils.py