def METHOD_NAME(self):
    def forward_code(np, data):
        a,b = data["inputs"]
        c,d = data["outputs"]
        np.add(a,b,out=c)
        np.subtract(a,b,out=d)
    def backward_code1(np, data):
        dout = data["dout"]
        out = data["outputs"][0]
        np.copyto(out, dout)
    def backward_code2(np, data):
        dout = data["dout"]
        out_index = data["out_index"]
        out = data["outputs"][0]
        if out_index==0:
            np.copyto(out, dout)
        else:
            np.negative(dout, out)
    def check():
        a = jt.random((5,1))
        b = jt.random((5,1))
        c, d = jt.numpy_code(
            [a.shape, a.shape],
            [a.dtype, a.dtype],
            [a, b],
            forward_code,
            [backward_code1,backward_code2],
        )
        assert numpy.allclose(c.data,(a+b).data)
        assert numpy.allclose(d.data,(a-b).data)
        dca, dcb = jt.grad(c,[a,b])
        dda, ddb = jt.grad(d,[a,b])
        one=numpy.ones(a.shape)
        mone=one*-1.0
        assert numpy.allclose(dca.data,one)
        assert numpy.allclose(dcb.data,one)
        assert numpy.allclose(dda.data,one)
        assert numpy.allclose(ddb.data,mone)
    if jt.has_cuda:
        with jt.flag_scope(use_cuda=1):
            check()
    check()