code: def test_groupby_nunique_with_sort(setup, gen_data1):
      df = gen_data1
      mdf = md.DataFrame(df, chunk_size=13)
  
      r = (
          mdf.groupby("b", sort=True)["a", "c"]
          .nunique()
          .execute()
          .fetch()
      )
  
      expected = df.groupby("b", sort=True)["a", "c"].nunique()
      pd.testing.assert_frame_equal(r, expected)
  
      r = (
          mdf.groupby(["b", "c"], sort=True)["a"]
          .nunique()
          .execute()
          .fetch()
      )
      expected = df.groupby(["b", "c"], sort=True)["a"].nunique()
      pd.testing.assert_series_equal(r, expected)
  
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 8 for calling a global function with example usage: test_groupby_nunique_with_sort(setup, gen_data1) without return types