code: def test_std(dtype: type[pl.DataType]) -> None:
      if dtype == pl.Int32:
          df = pl.DataFrame(
              [
                  pl.Series("groups", ["a", "a", "b", "b"]),
                  pl.Series("values", [1, 2, 3, 4], dtype=dtype),
              ]
          )
      else:
          df = pl.DataFrame(
              [
                  pl.Series("groups", ["a", "a", "b", "b"]),
                  pl.Series(
                      "values", [1.0, 2.0, 3.0, 4.0], dtype=dtype
                  ),
              ]
          )
  
      out = df.select(pl.col("values").std().over("groups"))
      assert np.isclose(out["values"][0], 0.7071067690849304)
  
      out = df.select(pl.col("values").var().over("groups"))
      assert np.isclose(out["values"][0], 0.5)
      out = df.select(pl.col("values").mean().over("groups"))
      assert np.isclose(out["values"][0], 1.5)
  
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 2 for calling a global function with example usage: test_std(dtype) without return types