code: def test_struct_arr_methods() -> None:
      df = pl.DataFrame(
          {
              "list_struct": [
                  [
                      {"a": 1, "b": 2},
                      {"a": 3, "b": 4},
                      {"a": 5, "b": 6},
                  ],
                  [{"a": 1, "b": 2}, {"a": 3, "b": 4}],
                  [{"a": 1, "b": 2}],
              ],
          }
      )
      assert df.select([pl.col("list_struct").list.first()]).to_dict(
          as_series=False
      ) == {
          "list_struct": [
              {"a": 1, "b": 2},
              {"a": 1, "b": 2},
              {"a": 1, "b": 2},
          ]
      }
      assert df.select([pl.col("list_struct").list.last()]).to_dict(
          as_series=False
      ) == {
          "list_struct": [
              {"a": 5, "b": 6},
              {"a": 3, "b": 4},
              {"a": 1, "b": 2},
          ]
      }
      assert df.select([pl.col("list_struct").list.get(0)]).to_dict(
          as_series=False
      ) == {
          "list_struct": [
              {"a": 1, "b": 2},
              {"a": 1, "b": 2},
              {"a": 1, "b": 2},
          ]
      }
  
imports: from __future__ import annotations
  from dataclasses import dataclass
  from datetime import datetime, time
  from typing import TYPE_CHECKING
  import pandas
  import pyarrow
  import pytest
  import polars
  import polars.selectors
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 20 for calling a global function with example usage: test_struct_arr_methods() without return types