code: def test_datetime_strptime_patterns_inconsistent() -> None:
      # note that the pattern is inferred from the first element to
      # be DatetimeDMY, and so the others (correctly) parse as `null`.
      df = pl.Series(
          "date",
          [
              "09-05-2019",
              "2018-09-05",
              "2018-09-05T04:05:01",
              "2018-09-05T04:24:01.9",
              "2018-09-05T04:24:02.11",
              "2018-09-05T14:24:02.123",
              "2018-09-05T14:24:02.123Z",
              "2019-04-18T02:45:55.555000000",
              "2019-04-18T22:45:55.555123",
          ],
      ).to_frame()
      s = df.with_columns(
          pl.col("date").str.to_datetime(strict=False).alias("parsed")
      )["parsed"]
      assert s.null_count() == 8
      assert s[0] is not None
  
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 16 for calling a global function with example usage: test_datetime_strptime_patterns_inconsistent() without return types