code: def test_list_new_from_index_logical() -> None:
      s = (
          pl.select(
              pl.struct(pl.Series("a", [date(2001, 1, 1)])).implode()
          )
          .to_series()
          .new_from_index(0, 1)
      )
      assert s.dtype == pl.List(pl.Struct([pl.Field("a", pl.Date)]))
      assert s.to_list() == [[{"a": date(2001, 1, 1)}]]
  
      # empty new_from_index # 8420
      dtype = pl.List(pl.Struct({"c": pl.Boolean}))
      s = pl.Series("b", values=[[]], dtype=dtype)
      s = s.new_from_index(0, 2)
      assert s.dtype == dtype
      assert s.to_list() == [[], []]
  
imports: from __future__ import annotations
  import pickle
  from datetime import date, datetime, time
  from typing import TYPE_CHECKING, Any
  import pandas
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 31 for calling a global function with example usage: test_list_new_from_index_logical() without return types