code: def _write_header(self, epoch_data: EpochData) -> None:
          
          self._variables = self._variables or list(next(iter(epoch_data.values())).keys())
          self._streams = epoch_data.keys()
  
          header = ['"epoch_id"']
          for stream_name in self._streams:
              header += [stream_name + '_' + var for var in self._variables]
          with open(self._file_path, 'a') as file:
              file.write(self._delimiter.join(header) + '\n')
          self._header_written = True
docs: Write CSV header row with column names.
  
          Column names are inferred from the ``epoch_data`` and ``self.variables`` (if specified).
          Variables and streams expected later on are stored in ``self._variables`` and ``self._streams`` respectively.
  
          :param epoch_data: epoch data to be logged