code: def test_write_parquet(pdf, hdfs, test_url):
      gdf = cudf.from_pandas(pdf)
      if test_url:
          hd_fpath = (
              "hdfs://{}:{}{}/test_parquet_writer.parquet".format(
                  host, port, basedir
              )
          )
      else:
          hd_fpath = f"hdfs://{basedir}/test_parquet_writer.parquet"
  
      gdf.to_parquet(hd_fpath)
  
      assert hdfs.exists(f"{basedir}/test_parquet_writer.parquet")
      with hdfs.open(
          f"{basedir}/test_parquet_writer.parquet", mode="rb"
      ) as f:
          got = pd.read_parquet(f)
  
      assert_eq(pdf, got)
  
imports: import os
  from io import BytesIO
  import fastavro
  import numpy
  import pandas
  import pyarrow
  import pytest
  import cudf
  from cudf.testing._utils import assert_eq
label_desc: Use image node_id 6 for calling a global function with example usage: test_write_parquet(pdf, hdfs, test_url) without return types