code: def test_read_avro(datadir, hdfs, test_url):
      fname = datadir / "avro" / "example.avro"
      # Read from local file system as buffer
      with open(fname, mode="rb") as f:
          buffer = BytesIO(f.read())
      # Write to hdfs
      hdfs.upload(basedir + "/file.avro", buffer)
  
      if test_url:
          hd_fpath = f"hdfs://{host}:{port}{basedir}/file.avro"
      else:
          hd_fpath = f"hdfs://{basedir}/file.avro"
  
      got = cudf.read_avro(hd_fpath)
      with open(fname, mode="rb") as f:
          expect = pd.DataFrame.from_records(fastavro.reader(f))
  
      for col in expect.columns:
          expect[col] = expect[col].astype(got[col].dtype)
      assert_eq(expect, 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 11 for calling a global function with example usage: test_read_avro(datadir, hdfs, test_url) without return types