def METHOD_NAME(self, epsg_or_crs: Union[CRS, int]) -> int:
    """Utility method to convert a epsg_or_crs to an epsg."""
    if isinstance(epsg_or_crs, CRS):
        return epsg_or_crs.epsg
    else:
        return epsg_or_crs