'List role assignments without applying expansion.
Returns a list of direct role assignments, where their attributes match
the provided filters. If subtree_ids is not None, then we also want to
include all subtree_ids in the filter as well.'

def _list_direct_role_assignments(self, role_id, user_id, group_id, domain_id, project_id, subtree_ids, inherited):

    group_ids = ([group_id] if group_id else None)
    project_ids_of_interest = None
    if project_id:
        if subtree_ids:
            project_ids_of_interest = (subtree_ids + [project_id])
        else:
            project_ids_of_interest = [project_id]
    return self.driver.list_role_assignments(role_id=role_id, user_id=user_id, group_ids=group_ids, domain_id=domain_id, project_ids=project_ids_of_interest, inherited_to_projects=inherited)
