class_docstr: An abstract class for data processing pipelines that transform datasets.
  
  A Pipeline can transform one or many inputs to one or many outputs. When there
  are many inputs or outputs, each input/output is assigned a string name.
  
  The `transform` method converts a given input or dictionary of inputs to
  a list of transformed outputs, or a dictionary mapping names to lists of
  transformed outputs for each name.
  
  The `get_stats` method returns any Statistics that were collected during the
  last call to `transform`. These Statistics can give feedback about why any
  data was discarded and what the input data is like.
  
  `Pipeline` implementers should call `_set_stats` from within `transform` to
  set the Statistics that will be returned by the next call to `get_stats`.
class_docstr_tok: ["An","abstract","class","for","data","processing","pipelines","that","transform","datasets",".","A","Pipeline","can","transform","one","or","many","inputs","to","one","or","many","outputs",".","When","there","are","many","inputs","or","outputs",",","each","input\/output","is","assigned","a","string","name",".","The","`","transform","`","method","converts","a","given","input","or","dictionary","of","inputs","to","a","list","of","transformed","outputs",",","or","a","dictionary","mapping","names","to","lists","of","transformed","outputs","for","each","name",".","The","`","get_stats","`","method","returns","any","Statistics","that","were","collected","during","the","last","call","to","`","transform","`",".","These","Statistics","can","give","feedback","about","why","any","data","was","discarded","and","what","the","input","data","is","like",".","`","Pipeline","`","implementers","should","call","`","_set_stats","`","from","within","`","transform","`","to","set","the","Statistics","that","will","be","returned","by","the","next","call","to","`","get_stats","`","."]
docstr: 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.
docstr_tok: ["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","."]
code: 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]
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import inspect
  import os.path
  from magenta.pipelines import statistics
  import six
  import tensorflow.compat.v1
label_desc: Use image node_id 8 for calling the Pipeline obj's underlying member method code with example usage: obj._set_stats(stats) without return types