def METHOD_NAME(self, axis):
    """Test the `Logsoftmax` substitution.
    Check that ``Log(Softmax(x))`` is substituted with ``Logsoftmax(x)``. Note that
    only the forward pass is checked (i.e., doesn't check the gradient)
    """
    x = matrix("x")
    sm = softmax(x, axis=axis)
    logsm = log(sm)
    fgraph = FunctionGraph([x], [logsm])
    _fast_run_rewrites.rewrite(fgraph)
    assert isinstance(fgraph.outputs[0].owner.op, LogSoftmax)
    assert check_stack_trace(fgraph, ops_to_check=LogSoftmax)
    assert check_stack_trace(fgraph, ops_to_check="all")