(self, stats)
Overwrites the current Statistics returned by `get_stats`.

    Implementers of Pipeline should call `_set_stats` from within `transform`.

    Args:
      stats: An iterable of Statistic objects.

    Raises:
      InvalidStatisticsError: If `stats` is not iterable, or if any
          object in the list is not a `Statistic` instance.
Overwrites the current Statistics returned by `get_stats`.
Overwrites the current Statistics returned by get_stats .
def _set_stats(self, stats):
    """Overwrites the current Statistics returned by `get_stats`.

    Implementers of Pipeline should call `_set_stats` from within `transform`.

    Args:
      stats: An iterable of Statistic objects.

    Raises:
      InvalidStatisticsError: If `stats` is not iterable, or if any
          object in the list is not a `Statistic` instance.
    """
    if not hasattr(stats, '__iter__'):
      raise InvalidStatisticsError(
          'Expecting iterable, got type %s' % type(stats))
    self._stats = [self._prepend_name(stat) for stat in stats]
def _set_stats ( self , stats ) : if not hasattr ( stats , '__iter__' ) : raise InvalidStatisticsError ( 'Expecting iterable, got type %s' % type ( stats ) ) self . _stats = [ self . _prepend_name ( stat ) for stat in stats ]