async def METHOD_NAME(
    command: discord.app_commands.Command[Any, ..., Any], raises: Optional[Type[BaseException]]
):
    interaction = MockCommandInteraction(client, command, foo='foo')
    await tree._call(interaction)
    if raises is None:
        assert tree.last_exception is None
    else:
        assert isinstance(tree.last_exception, discord.app_commands.CommandInvokeError)
        assert isinstance(tree.last_exception.original, raises)