code: def test_group_by_signed_transmutes() -> None:
      df = pl.DataFrame(
          {
              "foo": [-1, -2, -3, -4, -5],
              "bar": [500, 600, 700, 800, 900],
          }
      )
  
      for dt in [pl.Int8, pl.Int16, pl.Int32, pl.Int64]:
          df = (
              df.with_columns([pl.col("foo").cast(dt), pl.col("bar")])
              .group_by("foo", maintain_order=True)
              .agg(pl.col("bar").median())
          )
  
          assert df.to_dict(as_series=False) == {
              "foo": [-1, -2, -3, -4, -5],
              "bar": [500.0, 600.0, 700.0, 800.0, 900.0],
          }
  
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 13 for calling a global function with example usage: test_group_by_signed_transmutes() without return types