code: def test_to_from_buffer_lzo(df: pl.DataFrame) -> None:
      buf = io.BytesIO()
      # Writing lzo compressed parquet files is not supported for now.
      with pytest.raises(pl.ComputeError):
          df.write_parquet(buf, compression="lzo", use_pyarrow=False)
      buf.seek(0)
      # Invalid parquet file as writing failed.
      with pytest.raises(pl.ComputeError):
          _ = pl.read_parquet(buf)
  
      buf = io.BytesIO()
      with pytest.raises(OSError):
          # Writing lzo compressed parquet files is not supported for now.
          df.write_parquet(buf, compression="lzo", use_pyarrow=True)
      buf.seek(0)
      # Invalid parquet file as writing failed.
      with pytest.raises(pl.ComputeError):
          _ = pl.read_parquet(buf)
  
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 5 for calling a global function with example usage: test_to_from_buffer_lzo(df) without return types