code: def test_parquet_file_sorting_columns():
      table = pa.table({"a": [1, 2, 3], "b": ["a", "b", "c"]})
  
      sorting_columns = (
          pq.SortingColumn(
              column_index=0, descending=True, nulls_first=True
          ),
          pq.SortingColumn(column_index=1, descending=False),
      )
      writer = pa.BufferOutputStream()
      _write_table(table, writer, sorting_columns=sorting_columns)
      reader = pa.BufferReader(writer.getvalue())
  
      # Can retrieve sorting columns from metadata
      metadata = pq.read_metadata(reader)
      assert metadata.num_row_groups == 1
      assert sorting_columns == metadata.row_group(0).sorting_columns
  
imports: import datetime
  import decimal
  from collections import OrderedDict
  import io
  import numpy
  import pytest
  import pyarrow
  from pyarrow.tests.parquet.common import _check_roundtrip, make_sample_file
  from pyarrow.fs import LocalFileSystem
  from pyarrow.tests import util
label_desc: Use image node_id 10 for calling a global function with example usage: test_parquet_file_sorting_columns() without return types