code: def write_training_metrics(self):
          
          with open(self.path, 'w') as file:
              writer = csv.writer(file)
              writer.writerow(FIELD_NAMES)
              for row in self.rows:
                  writer.writerow(row)
docs: Write Training Metrics to CSV