code: def test_datetime_ranges_schema(
      values_time_zone: str | None,
      input_time_zone: str | None,
      output_time_zone: str | None,
      values_time_unit: TimeUnit,
      input_time_unit: TimeUnit | None,
      output_time_unit: TimeUnit,
  ) -> None:
      df = (
          pl.DataFrame(
              {
                  "start": [datetime(2020, 1, 1)],
                  "end": [datetime(2020, 1, 2)],
              }
          )
          .with_columns(
              pl.col("*")
              .dt.replace_time_zone(values_time_zone)
              .dt.cast_time_unit(values_time_unit)
          )
          .lazy()
      )
      result = df.with_columns(
          datetime_range=pl.datetime_ranges(
              pl.col("start"),
              pl.col("end"),
              time_zone=input_time_zone,
              time_unit=input_time_unit,
          )
      )
      expected_schema = {
          "start": pl.Datetime(
              time_unit=values_time_unit, time_zone=values_time_zone
          ),
          "end": pl.Datetime(
              time_unit=values_time_unit, time_zone=values_time_zone
          ),
          "datetime_range": pl.List(
              pl.Datetime(
                  time_unit=output_time_unit, time_zone=output_time_zone
              )
          ),
      }
      assert result.schema == expected_schema
      assert result.collect().schema == expected_schema
  
      expected = pl.DataFrame(
          {
              "start": [datetime(2020, 1, 1)],
              "end": [datetime(2020, 1, 2)],
              "datetime_range": [
                  [datetime(2020, 1, 1), datetime(2020, 1, 2)]
              ],
          }
      ).with_columns(
          pl.col("start")
          .dt.replace_time_zone(values_time_zone)
          .dt.cast_time_unit(values_time_unit),
          pl.col("end")
          .dt.replace_time_zone(values_time_zone)
          .dt.cast_time_unit(values_time_unit),
          pl.col("datetime_range")
          .explode()
          .dt.replace_time_zone(output_time_zone)
          .dt.cast_time_unit(output_time_unit)
          .implode(),
      )
      assert_frame_equal(result.collect(), expected)
  
imports: from __future__ import annotations
  from datetime import date, datetime, timedelta
  from typing import TYPE_CHECKING
  import pytest
  import polars
  from polars.datatypes import DTYPE_TEMPORAL_UNITS
  from polars.exceptions import ComputeError, TimeZoneAwareConstructorWarning
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 13 for calling a global function with example usage: test_datetime_ranges_schema(values_time_zone, input_time_zone, output_time_zone, values_time_unit, input_time_unit, output_time_unit) without return types