def new_iteration(self, prefix):
        """When inside a loop logger, created a new iteration
        """
        # Flush data for the current iteration
        self.flush()

        # Fix prefix
        self.prefix[-1] = prefix
        self.reset_formatter()
def new_iteration ( self , prefix ) : self . flush ( ) self . prefix [ - 1 ] = prefix self . reset_formatter ( )
When inside a loop logger, created a new iteration