code: def test_error_on_invalid_series_init() -> None:
      for dtype in pl.TEMPORAL_DTYPES:
          py_type = dtype_to_py_type(dtype)
          with pytest.raises(
              TypeError,
              match=f"'float' object cannot be interpreted as a {py_type.__name__!r}",
          ):
              pl.Series([1.5, 2.0, 3.75], dtype=dtype)
  
      with pytest.raises(
          TypeError,
          match="'float' object cannot be interpreted as an integer",
      ):
          pl.Series([1.5, 2.0, 3.75], dtype=pl.Int32)
  
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 4 for calling a global function with example usage: test_error_on_invalid_series_init() without return types