code: def test_sorted_window_expression() -> None:
      size = 10
      df = pl.DataFrame(
          {
              "a": np.random.randint(10, size=size),
              "b": np.random.randint(10, size=size),
          }
      )
      expr = (pl.col("a") + pl.col("b")).over("b").alias("computed")
  
      out1 = df.with_columns(expr).sort("b")
  
      # explicit sort
      df = df.sort("b")
      out2 = df.with_columns(expr)
  
      assert_frame_equal(out1, out2)
  
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 12 for calling a global function with example usage: test_sorted_window_expression() without return types