code: def add_group_role(request, role, group, domain=None, project=None):
      
      manager = keystoneclient(request, admin=True).roles
      return manager.grant(role=role, group=group, domain=domain,
                           project=project)
docs: Adds a role for a group on a domain or project.