code: def test_groupby_agg_nunique(setup, gen_data1):
      df = gen_data1
      mdf = md.DataFrame(df, chunk_size=13)
  
      r = mdf.groupby(["b", "c"]).agg("nunique").execute().fetch()
      expected = df.groupby(["b", "c"]).agg("nunique")
      pd.testing.assert_frame_equal(r, expected)
  
      r = (
          mdf.groupby(["b", "c"])
          .agg(["nunique"], method="tree")
          .execute()
          .fetch()
      )
      expected = df.groupby(["b", "c"]).agg(["nunique"])
      pd.testing.assert_frame_equal(r, expected)
  
      r = (
          mdf.groupby(["b", "c"])
          .agg(["nunique"], method="auto")
          .execute()
          .fetch()
      )
      expected = df.groupby(["b", "c"]).agg(["nunique"])
      pd.testing.assert_frame_equal(r, expected)
  
      r = (
          mdf.groupby(["b", "c"])
          .agg(["nunique"], method="shuffle")
          .execute()
          .fetch()
      )
      expected = df.groupby(["b", "c"]).agg(["nunique"])
      pd.testing.assert_frame_equal(r, expected)
  
      r = (
          mdf.groupby(["b", "c"], as_index=False)
          .agg("nunique")
          .execute()
          .fetch()
      )
      expected = df.groupby(["b", "c"], as_index=False).agg("nunique")
      pd.testing.assert_frame_equal(r, expected)
  
      r = (
          mdf.groupby(["b", "c"], as_index=False, sort=False)
          .agg("nunique")
          .execute()
          .fetch()
      )
      expected = df.groupby(["b", "c"], as_index=False, sort=False).agg(
          "nunique"
      )
      pd.testing.assert_frame_equal(r, expected)
  
      is_sort = [True, False]
      methods = ["auto", "shuffle", "tree"]
      for sort in is_sort:
          for method in methods:
              r = (
                  mdf.groupby("b", sort=sort)
                  .agg(["sum", "nunique"], method=method)
                  .execute()
                  .fetch()
              )
              expected = df.groupby("b", sort=sort).agg(
                  ["sum", "nunique"]
              )
              pd.testing.assert_frame_equal(
                  r.sort_index(), expected.sort_index()
              )
  
file_path: mars/mars/dataframe/groupby/tests/test_groupby_nunique_execution.py
imports: import numpy
  import pandas
  import pytest
  from ....None import dataframe
label_desc: Use image node_id 11 for calling a global function with example usage: test_groupby_agg_nunique(setup, gen_data1) without return types