docs: def get_role_by_code(role_code,**kwargs):
      """
          Get a role by its code
      """
      try:
          role = db.DBSession.query(Role).filter(Role.code==role_code).one()
          return role
      except NoResultFound:
          raise ResourceNotFoundError("Role not found (role_code={})".format(role_code))