def list_groups(client, display_name=None, query_filter=None):
    """
    list groups in the directory
    """
    sub_filters = []
    if query_filter:
        sub_filters.append(query_filter)
    if display_name:
        sub_filters.append("startswith(displayName,'{}')".format(display_name))
    return client.list(filter=' and '.join(sub_filters))
