def METHOD_NAME(self) -> int:
    batch_size = self.batch_size if self.batch_size else config.DEFAULT_MAX_BATCH_SIZE
    if isinstance(self.path_or_buf, (str, bytes, os.PathLike)):
        with open(self.path_or_buf, "wb+") as buffer:
            written = self._write(file_obj=buffer, batch_size=batch_size, **self.parquet_writer_kwargs)
    else:
        written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
    return written