code: def test_parquet_datetime(
      compression: ParquetCompression, use_pyarrow: bool
  ) -> None:
      # This failed because parquet writers cast datetime to Date
      f = io.BytesIO()
      data = {
          "datetime": [  # unix timestamp in ms
              1618354800000,
              1618354740000,
              1618354680000,
              1618354620000,
              1618354560000,
          ],
          "value1": [
              73.1999969482,
              71.0999984741,
              74.5,
              69.5999984741,
              69.6999969482,
          ],
          "value2": [
              59.5999984741,
              61.0,
              62.2999992371,
              56.9000015259,
              60.0,
          ],
      }
      df = pl.DataFrame(data)
      df = df.with_columns(df["datetime"].cast(pl.Datetime))
  
      df.write_parquet(
          f, use_pyarrow=use_pyarrow, compression=compression
      )
      f.seek(0)
      read = pl.read_parquet(f)
      assert_frame_equal(read, df)
  
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 10 for calling a global function with example usage: test_parquet_datetime(compression, use_pyarrow) without return types