def METHOD_NAME(TSTNet):
    tst_net = TSTNet()
    input_shape = (2, 3, 16, 16)
    input = nn.Variable.from_numpy_array((np.random.random(input_shape)))
    y = tst_net(input)
    y.forward()
    x = nn.ProtoVariable(input_shape)
    with nn.graph_def.graph() as g1:
        h = tst_net(x)
    with create_temp_with_dir(nnp_file) as tmp_file:
        g1.save(tmp_file)
        g2 = nn.graph_def.load(tmp_file)
        for net in g2.networks.values():
            out = net(input)
            out.forward()
        # should equal
        assert_allclose(out.d, y.d)