docstr: When group by level, get the level index list.
  Level can be int, level name, or sequence of such.
  This function calculates the corresponding indexes.
  Parameters
  ----------
  op
  data
  
  Returns
  -------
docstr_tok: ["When","group","by","level",",","get","the","level","index","list",".","Level","can","be","int",",","level","name",",","or","sequence","of","such",".","This","function","calculates","the","corresponding","indexes",".","Parameters","--","--","--","--","--","op","data","Returns","--","--","--","-"]
code: def _get_level_indexes(
      cls, op: DataFrameGroupByAgg, data: pd.DataFrame
  ) -> List[int]:
      """
      When group by level, get the level index list.
      Level can be int, level name, or sequence of such.
      This function calculates the corresponding indexes.
      Parameters
      ----------
      op
      data
  
      Returns
      -------
  
      """
      index = [data.index.name] if data.index.name else data.index.names
      index = pd.Index(index)
      level = op.groupby_params["level"]
      if isinstance(level, int):
          indexes = [level]
      elif isinstance(level, str):
          indexes = [index.get_loc(level)]
      else:
          level = list(level)
          if isinstance(level[0], int):
              indexes = level
          else:
              indexes = index.get_indexer(level).tolist()
      return indexes
  
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 1 for calling the DataFrameCustomGroupByNuniqueMixin obj's underlying member method code with example usage: obj._get_level_indexes(cls, op, data) and returns: indexes