code: def test_arg_sort_window_functions() -> None:
      df = pl.DataFrame(
          {"Id": [1, 1, 2, 2, 3, 3], "Age": [1, 2, 3, 4, 5, 6]}
      )
      out = df.select(
          [
              pl.col("Age").arg_sort().over("Id").alias("arg_sort"),
              pl.arg_sort_by("Age").over("Id").alias("arg_sort_by"),
          ]
      )
  
      assert (
          out["arg_sort"].to_list()
          == out["arg_sort_by"].to_list()
          == [0, 1, 0, 1, 0, 1]
      )
  
imports: from __future__ import annotations
  from datetime import date, datetime
  from typing import Any
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 5 for calling a global function with example usage: test_arg_sort_window_functions() without return types