code: def test_read_parquet_ext(
      s3_base,
      s3so,
      pdf_ext,
      bytes_per_thread,
      columns,
      index,
  ):
      fname = "test_parquet_reader_ext.parquet"
      bucket = "parquet"
      buffer = BytesIO()
  
      if index:
          pdf_ext.set_index(index).to_parquet(path=buffer)
      else:
          pdf_ext.to_parquet(path=buffer)
  
      # Check direct path handling
      buffer.seek(0)
      with s3_context(
          s3_base=s3_base, bucket=bucket, files={fname: buffer}
      ):
          got1 = cudf.read_parquet(
              f"s3://{bucket}/{fname}",
              storage_options=s3so,
              bytes_per_thread=bytes_per_thread,
              columns=columns,
          )
      if index:
          expect = (
              pdf_ext.set_index(index)[columns]
              if columns
              else pdf_ext.set_index(index)
          )
      else:
          expect = pdf_ext[columns] if columns else pdf_ext
      assert_eq(expect, got1)
  
imports: import os
  import socket
  from contextlib import contextmanager
  from io import BytesIO
  import numpy
  import pandas
  import pyarrow.fs
  import pytest
  from fsspec.core import get_fs_token_paths
  import cudf
  from cudf.testing._utils import assert_eq
label_desc: Use image node_id 14 for calling a global function with example usage: test_read_parquet_ext(s3_base, s3so, pdf_ext, bytes_per_thread, columns, index) without return types