code: def remove_role(*_, role_handle=None, user_id=None):
      
      click.echo(green('\nRemoving role from user:'))
      click.echo(green('-' * 40))
      with get_app().app_context():
          user = find_user(dict(id=user_id))
          if not user:
              click.echo(red('User not found\n'))
              return
  
          remove_role = None
          for role in user.roles:
              if role.handle == role_handle:
                  remove_role = role
  
          if not remove_role:
              click.echo(red('User does not have such role\n'))
              return
  
          user_service.remove_role_from_user(user, remove_role)
          msg = 'Role "{}" removed from user "{}"\n'.format(
              remove_role.handle,
              user.email
          )
          click.echo(green(msg))
          return
docs: Remove role from user