def METHOD_NAME(self, record: Mapping[str, str]) -> None:
    """
    Write to a parquet file. On provision of the first record, the key names in the record
    are used as header fields.
    :param record: the record to write to the stream
    """
    # If we haven't written the header yet, we need to do that
    if self._writer is None:
        self._writer = _create_writer(self._file, record)
    # Add this to the internal buffer
    self._write_row(record)
    # We sample the byte size of a row being written every N rows, then assume that the previous N rows
    # were all that size, when that buffer estimate is above the row group size, we flush the table.
    # This tends to over-estimate quite badly (especially given compression) so we have a scaling factor.
    if self._row_count >= self._next_row_memory_check:
        row_sz: int = self._getsize(record)
        # This tends to massively over-estimate, so we scale down by a scaling factor
        total_predicted: int = (row_sz * self._mem_sample_duration) / 5
        self._total_memory += total_predicted
        if self._total_memory >= ROW_GROUP_SIZE:
            # Total memory estimate exceeds row group size
            self._flush_table()
        else:
            # Room to grow, re-calculate sample duration
            self._mem_sample_duration = self._get_next_mem_sample_duration()
            self._next_row_memory_check = self._row_count + self._mem_sample_duration