docstr: Write RecordBatch or Table to the Parquet file.
  
  Parameters
  ----------
  table_or_batch : {RecordBatch, Table}
  row_group_size : int, default None
      Maximum number of rows in each written row group. If None,
      the row group size will be the minimum of the input
      table or batch length and 1024 * 1024.
docstr_tok: ["Write","RecordBatch","or","Table","to","the","Parquet","file",".","Parameters","--","--","--","--","--","table_or_batch",":","{","RecordBatch",",","Table","}","row_group_size",":","int",",","default","None","Maximum","number","of","rows","in","each","written","row","group",".","If","None",",","the","row","group","size","will","be","the","minimum","of","the","input","table","or","batch","length","and","1024","*","1024","."]
code: def write(self, table_or_batch, row_group_size=None):
      """
      Write RecordBatch or Table to the Parquet file.
  
      Parameters
      ----------
      table_or_batch : {RecordBatch, Table}
      row_group_size : int, default None
          Maximum number of rows in each written row group. If None,
          the row group size will be the minimum of the input
          table or batch length and 1024 * 1024.
      """
      if isinstance(table_or_batch, pa.RecordBatch):
          self.write_batch(table_or_batch, row_group_size)
      elif isinstance(table_or_batch, pa.Table):
          self.write_table(table_or_batch, row_group_size)
      else:
          raise TypeError(type(table_or_batch))
  
imports: from collections import defaultdict
  from contextlib import nullcontext
  from functools import reduce
  import inspect
  import json
  import os
  import re
  import operator
  import warnings
  import pyarrow
  from pyarrow._parquet import ParquetReader, Statistics, FileMetaData, RowGroupMetaData, ColumnChunkMetaData, ParquetSchema, ColumnSchema, ParquetLogicalType, FileEncryptionProperties, FileDecryptionProperties, SortingColumn
  from pyarrow.fs import LocalFileSystem, FileSystem, FileType, _resolve_filesystem_and_path, _ensure_filesystem
  from pyarrow import filesystem
  from pyarrow.util import guid, _is_path_like, _stringify_path, _deprecate_api
label_desc: Use image node_id 5 for calling the ParquetWriter obj's underlying member method code with example usage: obj.write(table_or_batch, row_group_size) without return types