code: def test_window_cached_keys_sorted_update_4183() -> None:
      df = pl.DataFrame(
          {
              "customer_ID": ["0", "0", "1"],
              "date": [1, 2, 3],
          }
      )
      result = df.sort(by=["customer_ID", "date"]).select(
          [
              pl.count("date")
              .over(pl.col("customer_ID"))
              .alias("count"),
              pl.col("date")
              .rank(method="ordinal")
              .over(pl.col("customer_ID"))
              .alias("rank"),
          ]
      )
      expected = pl.DataFrame(
          {"count": [2, 2, 1], "rank": [1, 2, 1]},
          schema={"count": pl.UInt32, "rank": pl.UInt32},
      )
      assert_frame_equal(result, expected)
  
imports: from __future__ import annotations
  import numpy
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 10 for calling a global function with example usage: test_window_cached_keys_sorted_update_4183() without return types