def METHOD_NAME(self, record):
    """Add the metric of a record to the current row.
    :param record:
    :return:
    """
    if record.name in self.headers and self.current_row is not None:
        if record.name == "learning_rate" and not record.is_scalar:
            # record is a list of scalars
            value = ",".join([f"{lr:.4f}" for lr in record.value])
        elif record.is_scalar and isinstance(record.value, int):
            value = str(record.value)
        else:
            assert record.is_scalar
            value = f"{record.value:.4f}"
        self.current_row[record.name] = value