code: def test_string_date() -> None:
      df = pl.DataFrame({"x1": ["2021-01-01"]}).with_columns(
          **{"x1-date": pl.col("x1").cast(pl.Date)}
      )
      expected = pl.DataFrame({"x1-date": [date(2021, 1, 1)]})
      out = df.select(pl.col("x1-date"))
      assert_frame_equal(expected, out)
  
imports: from __future__ import annotations
  from datetime import date, datetime, time, timedelta
  from typing import Any
  import pytest
  import polars
  from polars.exceptions import ComputeError
  from polars.testing import assert_frame_equal
  from polars.testing.asserts.series import assert_series_equal
  from polars.utils.convert import MS_PER_SECOND, NS_PER_SECOND, US_PER_SECOND
label_desc: Use image node_id 1 for calling a global function with example usage: test_string_date() without return types