def METHOD_NAME(self, record: "pb.Record") -> int:
    assert self._ds
    self._record_num += 1
    proto_util._assign_record_num(record, self._record_num)
    ret = self._ds.write(record)
    assert ret is not None
    _start_offset, end_offset, _flush_offset = ret
    proto_util._assign_end_offset(record, end_offset)
    return end_offset