@classmethod<EOL><INDENT>def query_by_names(cls, names):<DEDENT>
assert isinstance(names, list)<EOL>return cls.query.filter(cls.name.in_(names))<EOL>
Query group by a list of group names.

        :param list names: List of the group names.
        :returns: Query object.