code: def _get_execute_map_result(
      cls, op: DataFrameGroupByAgg, in_data: pd.DataFrame
  ) -> Union[pd.DataFrame, pd.Series]:
      selections = cls._get_selection_columns(op)
      by_cols = op.raw_groupby_params["by"]
      if by_cols is not None:
          cols = (
              [*selections, *by_cols]
              if selections is not None
              else in_data.columns
          )
          res = (
              in_data[cols]
              .drop_duplicates(subset=cols)
              .set_index(by_cols)
          )
      else:  # group by level
          selections = (
              selections if selections is not None else in_data.columns
          )
          level_indexes = cls._get_level_indexes(op, in_data)
          in_data = in_data.reset_index()
          index_names = in_data.columns[level_indexes].tolist()
          cols = [*index_names, *selections]
          res = in_data[cols].drop_duplicates().set_index(index_names)
  
      # if sort=True is specified， sort index when finishing drop_duplicates.
      if op.raw_groupby_params["sort"]:
          res = res.sort_index()
  
      if op.output_types[0] == OutputType.series:
          res = res.squeeze()
  
      return res
  
file_path: mars/mars/dataframe/groupby/nunique.py
imports: from typing import List, Union
  import pandas
  from ...core import OutputType
  from ...utils import implements
  from .aggregation import DataFrameGroupByAgg
  from .custom_aggregation import DataFrameCustomGroupByAggMixin, register_custom_groupby_agg_func
label_desc: Use image node_id 3 for calling the DataFrameCustomGroupByNuniqueMixin obj's underlying member method code with example usage: obj._get_execute_map_result(cls, op, in_data) and returns: res