code: def labels(self):
      # this was index_int, but that's not a very good name...
      codes = getattr(self.index, "codes", None)
      if codes is None:
          if hasattr(self.index, "labels"):
              codes = self.index.labels
          else:
              codes = pd.Categorical(self.index).codes[None]
      return codes
  
imports: from statsmodels.compat.python import lrange, lzip
  import numpy
  import pandas
  import statsmodels.tools.data
  from pandas import Index, MultiIndex
label_desc: Use image node_id 4 for calling the Grouping obj's underlying member method code with example usage: obj.labels() and returns: codes