code: def _get_group_index(self, index):
          
  
          g_index = None
          for group in self.groups:
              if group[0] == index:
                  g_index = group[1]
                  break
          return g_index
docs: Find and return the appropriate group index.