'Return a list of groups matching the specified criteria.
:param query: filter groups by name with this string
:param exclude: filter out groups by name with this string
:param maxResults: maximum results to return. defaults to 9999'

def groups(self, query=None, exclude=None, maxResults=9999):

    params = {}
    groups = []
    if (query is not None):
        params[u'query'] = query
    if (exclude is not None):
        params[u'exclude'] = exclude
    if (maxResults is not None):
        params[u'maxResults'] = maxResults
    for group in self._get_json(u'groups/picker', params=params)[u'groups']:
        groups.append(group[u'name'])
    return sorted(groups)
