code: def test_flat_aggregation_to_list_conversion_6918() -> None:
      df = pl.DataFrame({"a": [1, 2, 2], "b": [[0, 1], [2, 3], [4, 5]]})
  
      assert df.group_by("a", maintain_order=True).agg(
          pl.concat_list(
              [
                  pl.col("b").list.get(i).mean().implode()
                  for i in range(2)
              ]
          )
      ).to_dict(as_series=False) == {
          "a": [1, 2],
          "b": [[[0.0, 1.0]], [[3.0, 4.0]]],
      }
  
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 16 for calling a global function with example usage: test_flat_aggregation_to_list_conversion_6918() without return types