<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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()