code: def flush_if_ended(self):
  		
  		if self.ended and self.next and len(self.files) == self.transformed:
  			future = asyncio.ensure_future(self.transformer.flush())
  			future.add_done_callback(lambda x: self.next.end_of_stream())
docs: Call 'flush' function if all files have been transformed.