def METHOD_NAME(cls, stats: RasterStats,
                      **kwargs) -> 'StatsTransformer':
    """Build with stats from a :class:`.RasterStats` instance.
    The file is expected to be in the same format as written by
    :meth:`.RasterStats.save`.
    Args:
        stats (RasterStats): A :class:`.RasterStats` instance with
            non-None stats.
        **kwargs: Extra args for :meth:`.__init__`.
    Returns:
        StatsTransformer: A StatsTransformer.
    """
    stats_transformer = StatsTransformer(stats.means, stats.stds, **kwargs)
    return stats_transformer