code: def test_list_amortized_iter_clear_settings_10126() -> None:
      out = (
          pl.DataFrame(
              {"a": [[1], [1], [2]], "b": [[1, 2], [1, 3], [4]]}
          )
          .explode("a")
          .group_by("a")
          .agg(pl.col("b").flatten())
          .with_columns(pl.col("b").list.unique())
          .sort("a")
      )
  
      assert out.to_dict(as_series=False) == {
          "a": [1, 2],
          "b": [[1, 2, 3], [4]],
      }
  
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 36 for calling a global function with example usage: test_list_amortized_iter_clear_settings_10126() without return types