code: def test_issue_2529() -> None:
      def stdize_out(value: str, control_for: str) -> pl.Expr:
          return (
              pl.col(value) - pl.mean(value).over(control_for)
          ) / pl.std(value).over(control_for)
  
      df = pl.from_dicts(
          [
              {"cat": cat, "val1": cat + _, "val2": cat + _}
              for cat in range(2)
              for _ in range(2)
          ]
      )
  
      out = df.select(
          [
              "*",
              stdize_out("val1", "cat").alias("out1"),
              stdize_out("val2", "cat").alias("out2"),
          ]
      )
      assert out["out1"].to_list() == out["out2"].to_list()
  
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 3 for calling a global function with example usage: test_issue_2529() and returns: unknown