code: def test_write_chunked_parquet(s3_base, s3so):
      df1 = cudf.DataFrame({"b": [10, 11, 12], "a": [1, 2, 3]})
      df2 = cudf.DataFrame({"b": [20, 30, 50], "a": [3, 2, 1]})
      dirname = "chunked_writer_directory"
      bucket = "parquet"
      from cudf.io.parquet import ParquetDatasetWriter
  
      with s3_context(
          s3_base=s3_base, bucket=bucket, files={dirname: BytesIO()}
      ) as s3fs:
          with ParquetDatasetWriter(
              f"s3://{bucket}/{dirname}",
              partition_cols=["a"],
              storage_options=s3so,
          ) as cw:
              cw.write_table(df1)
              cw.write_table(df2)
  
          # TODO: Replace following workaround with:
          # expect = cudf.read_parquet(f"s3://{bucket}/{dirname}/",
          # storage_options=s3so)
          # after the following bug is fixed:
          # https://issues.apache.org/jira/browse/ARROW-16438
  
          dfs = []
          for folder in {"a=1", "a=2", "a=3"}:
              assert s3fs.exists(f"s3://{bucket}/{dirname}/{folder}")
              for file in s3fs.ls(f"s3://{bucket}/{dirname}/{folder}"):
                  df = cudf.read_parquet(
                      "s3://" + file, storage_options=s3so
                  )
                  dfs.append(df)
  
          actual = cudf.concat(dfs).astype("int64")
          assert_eq(
              actual.sort_values(["b"]).reset_index(drop=True),
              cudf.concat([df1, df2])
              .sort_values(["b"])
              .reset_index(drop=True),
          )
  
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 23 for calling a global function with example usage: test_write_chunked_parquet(s3_base, s3so) without return types