code: def test_err_on_time_datetime_cast() -> None:
      s = pl.Series([time(10, 0, 0), time(11, 30, 59)])
      with pytest.raises(
          pl.ComputeError, match=r"cannot cast `Time` to `Datetime`"
      ):
          s.cast(pl.Datetime)
  
imports: from __future__ import annotations
  import io
  from datetime import date, datetime, time
  from decimal import Decimal
  from typing import TYPE_CHECKING, Any
  import numpy
  import pytest
  import polars
  from polars.datatypes.convert import dtype_to_py_type
  from polars.exceptions import InvalidOperationError
label_desc: Use image node_id 38 for calling a global function with example usage: test_err_on_time_datetime_cast() without return types