code: def _get_group_no(self, tag_name):
          
  
          if tag_name in self.full:
              return self.groups.index(self.full[tag_name]["parent"])
          else:
              return len(self.groups)
docs: Takes tag name and returns the number of the group to which tag belongs