def METHOD_NAME(self, query):
    for group in self.findall(query):
        if "ref" in group.attrib:
            name = group.get('ref')
            return self.get_group_attributes(name)
    return []