code: def test_groupby_tabular_std(
      ray_start_regular_shared, ds_format, num_parts
  ):
      # Test built-in std aggregation
      seed = int(time.time())
      print(f"Seeding RNG for test_groupby_tabular_std with: {seed}")
      random.seed(seed)
      xs = list(range(100))
      random.shuffle(xs)
  
      def _to_arrow(ds):
          return ds.map_batches(
              lambda x: x, batch_size=None, batch_format="pyarrow"
          )
  
      df = pd.DataFrame({"A": [x % 3 for x in xs], "B": xs})
      ds = ray.data.from_pandas(df).repartition(num_parts)
      if ds_format == "arrow":
          ds = _to_arrow(ds)
      agg_ds = ds.groupby("A").std("B")
      assert agg_ds.count() == 3
      result = agg_ds.to_pandas()["std(B)"].to_numpy()
      expected = df.groupby("A")["B"].std().to_numpy()
      np.testing.assert_array_almost_equal(result, expected)
      # ddof of 0
      ds = ray.data.from_pandas(df).repartition(num_parts)
      if ds_format == "arrow":
          ds = _to_arrow(ds)
      agg_ds = ds.groupby("A").std("B", ddof=0)
      assert agg_ds.count() == 3
      result = agg_ds.to_pandas()["std(B)"].to_numpy()
      expected = df.groupby("A")["B"].std(ddof=0).to_numpy()
      np.testing.assert_array_almost_equal(result, expected)
  
      # Test built-in std aggregation with nans
      nan_df = pd.DataFrame(
          {"A": [x % 3 for x in xs] + [0], "B": xs + [None]}
      )
      ds = ray.data.from_pandas(nan_df).repartition(num_parts)
      if ds_format == "arrow":
          ds = _to_arrow(ds)
      nan_grouped_ds = ds.groupby("A")
      nan_agg_ds = nan_grouped_ds.std("B")
      assert nan_agg_ds.count() == 3
      result = nan_agg_ds.to_pandas()["std(B)"].to_numpy()
      expected = nan_df.groupby("A")["B"].std().to_numpy()
      np.testing.assert_array_almost_equal(result, expected)
      # Test ignore_nulls=False
      nan_agg_ds = nan_grouped_ds.std("B", ignore_nulls=False)
      assert nan_agg_ds.count() == 3
      result = nan_agg_ds.to_pandas()["std(B)"].to_numpy()
      expected = nan_df.groupby("A")["B"].std().to_numpy()
      assert result[0] is None or np.isnan(result[0])
      np.testing.assert_array_almost_equal(result[1:], expected[1:])
      # Test all nans
      nan_df = pd.DataFrame(
          {"A": [x % 3 for x in xs], "B": [None] * len(xs)}
      )
      ds = ray.data.from_pandas(nan_df).repartition(num_parts)
      if ds_format == "arrow":
          ds = _to_arrow(ds)
      nan_agg_ds = ds.groupby("A").std("B", ignore_nulls=False)
      assert nan_agg_ds.count() == 3
      result = nan_agg_ds.to_pandas()["std(B)"].to_numpy()
      expected = pd.Series([None] * 3)
      np.testing.assert_array_equal(result, expected)
  
imports: import itertools
  import math
  import random
  import time
  from unittest.mock import patch
  import numpy
  import pandas
  import pyarrow
  import pytest
  import ray
  from ray.data.aggregate import AggregateFn, Count, Max, Mean, Min, Quantile, Std, Sum
  from ray.data.context import DataContext
  from ray.data.tests.conftest import *
  from ray.data.tests.util import column_udf, named_values
  from ray.tests.conftest import *
label_desc: Use image node_id 24 for calling a global function with example usage: test_groupby_tabular_std(ray_start_regular_shared, ds_format, num_parts) and returns: ds