human
I wrote the below code

    def search_make_one_sub():
        for node in fgraph.toposort():
            if (node.op == crossentropy_categorical_1hot):
                (nll,) = node.outputs
                (sm, one_of_n) = node.inputs
                if (sm.owner and (sm.owner.op == softmax_with_bias)):
                    (x, b) = sm.owner.inputs
                    (new_nll, new_sm, new_am) = crossentropy_softmax_argmax_1hot_with_bias(x, b, one_of_n)
                    fgraph.replace_all_validate([(nll, new_nll), (sm, new_sm)], reason='crossentropy_to_crossentropy_with_softmax_with_bias')
                    return True
        return False
    while search_make_one_sub():
        pass
    return

What's a good function header?

Here's a good function header?
assistant
#Here's a good function header.

@opt.register_stabilize('fast_compile_gpu')
@opt.register_specialize('fast_compile_gpu')
@gof.optimizer
def crossentropy_to_crossentropy_with_softmax_with_bias(fgraph):