def get_role(role_id,**kwargs):
    """
        Get a role by its ID.
    """
    try:
        role = db.DBSession.query(Role).filter(Role.id==role_id).one()
        return role
    except NoResultFound:
        raise HydraError("Role not found (role_id={})".format(role_id))
Get a role by its ID.