code: def test_read_single_row_group_with_column_subset():
      N, K = 10000, 4
      df = alltypes_sample(size=N)
      a_table = pa.Table.from_pandas(df)
  
      buf = io.BytesIO()
      _write_table(
          a_table,
          buf,
          row_group_size=N / K,
          compression="snappy",
          version="2.6",
      )
  
      buf.seek(0)
      pf = pq.ParquetFile(buf)
  
      cols = list(df.columns[:2])
      row_groups = [
          pf.read_row_group(i, columns=cols) for i in range(K)
      ]
      result = pa.concat_tables(row_groups)
      tm.assert_frame_equal(df[cols], result.to_pandas())
  
      # ARROW-4267: Selection of duplicate columns still leads to these columns
      # being read uniquely.
      row_groups = [
          pf.read_row_group(i, columns=cols + cols) for i in range(K)
      ]
      result = pa.concat_tables(row_groups)
      tm.assert_frame_equal(df[cols], result.to_pandas())
  
file_path: arrow/python/pyarrow/tests/parquet/test_parquet_file.py
imports: import io
  import os
  import sys
  import pytest
  import pyarrow
label_desc: Use image node_id 3 for calling a global function with example usage: test_read_single_row_group_with_column_subset() without return types