def METHOD_NAME(cls, uri: str, **kwargs) -> 'StatsTransformer':
    """Build with stats from a JSON file.
    The file is expected to be in the same format as written by
    :meth:`.RasterStats.save`.
    Args:
        uri (str): URI of the JSON file.
        **kwargs: Extra args for :meth:`.__init__`.
    Returns:
        StatsTransformer: A StatsTransformer.
    """
    stats = RasterStats.load(uri)
    stats_transformer = StatsTransformer.from_raster_stats(stats, **kwargs)
    return stats_transformer