code: def _geopandas_to_arrow(df, index=None, schema_version=None):
      """
      Helper function with main, shared logic for to_parquet/to_feather.
      """
      from pyarrow import Table
  
      _validate_dataframe(df)
  
      # create geo metadata before altering incoming data frame
      geo_metadata = _create_metadata(df, schema_version=schema_version)
  
      kwargs = {"flavor": "iso"}
      df = df.to_wkb(**kwargs)
  
      table = Table.from_pandas(df, preserve_index=index)
  
      # Store geopandas specific file-level metadata
      # This must be done AFTER creating the table or it is not persisted
      metadata = table.schema.metadata
      metadata.update({b"geo": _encode_metadata(geo_metadata)})
  
      return table.replace_schema_metadata(metadata)
  
imports: from packaging.version import Version
  import json
  import warnings
  import numpy
  from pandas import DataFrame, Series
  from geopandas._compat import import_optional_dependency
  from geopandas.array import from_wkb
  from geopandas import GeoDataFrame
  import geopandas
  from .file import _expand_user
label_desc: Use image node_id 8 for calling a global function with example usage: _geopandas_to_arrow(df, index, schema_version) and returns: table