code: def _write_table(table, path, **kwargs):
      # So we see the ImportError somewhere
      import pyarrow.parquet as pq
      from pyarrow.pandas_compat import _pandas_api
  
      if _pandas_api.is_data_frame(table):
          table = pa.Table.from_pandas(table)
  
      pq.write_table(table, path, **kwargs)
      return table
  
file_path: arrow/python/pyarrow/tests/parquet/common.py
imports: import io
  import numpy
  import pyarrow
  from pyarrow.tests import util
label_desc: Use image node_id 1 for calling a global function with example usage: _write_table(table, path) and returns: table