<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def after_epoch(self, epoch_id: int, epoch_data: EpochData) -> None: """ Write a new row to the CSV file with the given epoch data. In the case of first invocation, create the CSV header. :param epoch_id: number of the epoch :param epoch_data: epoch data to be logged """

        logging.debug('Saving epoch %d data to "%s"', epoch_id, self._file_path)
        if not self._header_written:
            self._write_header(epoch_data=epoch_data)
        self._write_row(epoch_id=epoch_id, epoch_data=epoch_data)