code: def test_from_to_file(
      example_df: pl.DataFrame,
      compression: AvroCompression,
      tmp_path: Path,
  ) -> None:
      tmp_path.mkdir(exist_ok=True)
  
      file_path = tmp_path / "small.avro"
      example_df.write_avro(file_path, compression=compression)
      df_read = pl.read_avro(file_path)
  
      assert_frame_equal(example_df, df_read)
  
file_path: polars/py-polars/tests/unit/io/test_avro.py
imports: from __future__ import annotations
  import io
  from typing import TYPE_CHECKING
  import pytest
  import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 3 for calling a global function with example usage: test_from_to_file(example_df, compression, tmp_path) without return types