def METHOD_NAME(cls, skycoord, wcs, origin=_DEFAULT_WCS_ORIGIN,
             mode=_DEFAULT_WCS_MODE):
    """
    Create `PixCoord` from a `~astropy.coordinates.SkyCoord`.
    Parameters
    ----------
    skycoord : `~astropy.coordinates.SkyCoord`
        The sky coordinate.
    wcs : `~astropy.wcs.WCS`
        The WCS to use to convert pixels to world coordinates.
    origin : int, optional
        Whether to return 0 or 1-based pixel coordinates.
    mode : {'all', 'wcs'}, optional
        Whether to do the transformation including distortions
        (``'all'``) or only including only the core WCS
        transformation (``'wcs'``).
    Returns
    -------
    coord : `PixCoord`
        A new `PixCoord` object at the position of the input sky
        coordinates.
    """
    x, y = skycoord.to_pixel(wcs=wcs, origin=origin, mode=mode)
    return cls(x=x, y=y)