code: def test_to_datetime_dates_datetimes() -> None:
      s = pl.Series("date", ["2021-04-22", "2022-01-04 00:00:00"])
      assert s.str.to_datetime().to_list() == [
          datetime(2021, 4, 22, 0, 0),
          datetime(2022, 1, 4, 0, 0),
      ]
  
imports: from __future__ import annotations
  import contextlib
  from datetime import date, datetime, time, timedelta, timezone
  from typing import TYPE_CHECKING
  import pytest
  import polars
  from polars.exceptions import ComputeError, TimeZoneAwareConstructorWarning
  from polars.testing import assert_series_equal
label_desc: Use image node_id 9 for calling a global function with example usage: test_to_datetime_dates_datetimes() without return types