code: def process_role(ctx, param, value):
      
      role = Role.query.filter(Role.name == value).first()
      if not role:
          raise click.BadParameter('Role with name \'%s\' not found.', value)
      return role
docs: Return a role if it exists.