@staticmethod
def _reproject(wcs1, wcs2, x, y):
    """
        Perform the forward transformation of ``wcs1`` followed by the
        inverse transformation of ``wcs2``.

        Parameters
        ----------
        wcs1, wcs2 : WCS objects
            World coordinate system (WCS) transformations that support
            the `astropy shared interface for WCS
            <https://docs.astropy.org/en/stable/wcs/wcsapi.html>`_ (e.g.
            `astropy.wcs.WCS`, `gwcs.wcs.WCS`).

        Returns
        -------
        x, y:  float or array-like of float
            The pixel coordinates.
        """
    try:
        skycoord = wcs1.pixel_to_world(x, y)
        return wcs2.world_to_pixel(skycoord)
    except AttributeError:
        raise ValueError(
            'Input wcs objects do not support the shared WCS interface.')
