code: def test_to_from_file(
      df: pl.DataFrame, compression: ParquetCompression, tmp_path: Path
  ) -> None:
      tmp_path.mkdir(exist_ok=True)
  
      file_path = tmp_path / "small.avro"
      df.write_parquet(file_path, compression=compression)
      read_df = pl.read_parquet(file_path)
      assert_frame_equal(df, read_df, categorical_as_str=True)
  
imports: from __future__ import annotations
  import io
  from datetime import datetime, time, timezone
  from decimal import Decimal
  from typing import TYPE_CHECKING
  import numpy
  import pandas
  import pyarrow
  import pyarrow.dataset
  import pyarrow.parquet
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 6 for calling a global function with example usage: test_to_from_file(df, compression, tmp_path) without return types