code: def test_invalid_string_date() -> None:
      df = pl.DataFrame({"x1": ["2021-01-aa"]})
  
      with pytest.raises(ComputeError):
          df.with_columns(**{"x1-date": pl.col("x1").cast(pl.Date)})
  
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 2 for calling a global function with example usage: test_invalid_string_date() without return types