code: def test_date_parse_omit_day() -> None:
      df = pl.DataFrame({"month": ["2022-01"]})
      assert df.select(
          pl.col("month").str.to_date(format="%Y-%m")
      ).item() == date(2022, 1, 1)
      assert df.select(
          pl.col("month").str.to_datetime(format="%Y-%m")
      ).item() == datetime(2022, 1, 1)
  
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 2 for calling a global function with example usage: test_date_parse_omit_day() without return types