'Flush data after all samples have been injected to pipeline.'

def flush(self):

    for (i, transformer) in enumerate(self.transformers):
        try:
            self._publish_samples((i + 1), list(transformer.flush()))
        except Exception:
            LOG.error(('Pipeline    %(pipeline)s:    Error    flushing    transformer    %(trans)s' % {'pipeline': self, 'trans': transformer}), exc_info=True)
