code: def test_from_to_buffer(
      example_df: pl.DataFrame, compression: AvroCompression
  ) -> None:
      buf = io.BytesIO()
      example_df.write_avro(buf, compression=compression)
      buf.seek(0)
  
      read_df = pl.read_avro(buf)
      assert_frame_equal(example_df, read_df)
  
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 2 for calling a global function with example usage: test_from_to_buffer(example_df, compression) without return types