code: def test_invalid_inner_type_cast_list() -> None:
      s = pl.Series([[-1, 1]])
      with pytest.raises(
          pl.ComputeError,
          match=r"cannot cast List inner type: 'Int64' to Categorical",
      ):
          s.cast(pl.List(pl.Categorical))
  
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 40 for calling a global function with example usage: test_invalid_inner_type_cast_list() without return types