code: def test_group_by_shorthand_quantile(df: pl.DataFrame) -> None:
      result = df.group_by("b", maintain_order=True).quantile(0.5)
      expected = [("a", 2.0, 1.0), ("b", 4.0, 1.0)]
      assert result.rows() == expected
  
      result = (
          df.lazy()
          .group_by("b", maintain_order=True)
          .quantile(0.5)
          .collect()
      )
      assert result.rows() == expected
  
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 4 for calling a global function with example usage: test_group_by_shorthand_quantile(df) without return types