code: def test_group_by_when_then_with_binary_and_agg_in_pred_6202() -> (
      None
  ):
      df = pl.DataFrame(
          {
              "code": ["a", "b", "b", "b", "a"],
              "xx": [1.0, -1.5, -0.2, -3.9, 3.0],
          }
      )
      assert (
          df.group_by("code", maintain_order=True).agg(
              [
                  pl.when(pl.col("xx") > pl.min("xx"))
                  .then(True)
                  .otherwise(False)
              ]
          )
      ).to_dict(as_series=False) == {
          "code": ["a", "b"],
          "literal": [[False, True], [True, True, False]],
      }
  
imports: from __future__ import annotations
  from collections import OrderedDict
  from datetime import datetime, timedelta
  from typing import Any
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 22 for calling a global function with example usage: test_group_by_when_then_with_binary_and_agg_in_pred_6202() without return types