code: def test_list_to_array_wrong_dtype() -> None:
      s = pl.Series([1.0, 2.0])
      with pytest.raises(pl.ComputeError, match="expected List dtype"):
          s.list.to_array(2)
  
imports: from __future__ import annotations
  from datetime import date, datetime
  import numpy
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 44 for calling a global function with example usage: test_list_to_array_wrong_dtype() without return types