def METHOD_NAME(self):
    meta_base = self.path_to("tf_graph")
    ArrayKey("A")
    ArrayKey("B")
    ArrayKey("C")
    ArrayKey("GRADIENT_A")
    # create model meta graph file and get input/output names
    (a, b, c, optimizer, loss) = self.create_meta_graph(meta_base)
    source = ExampleTensorflowTrainSource()
    train = Train(
        meta_base,
        optimizer=optimizer,
        loss=loss,
        inputs={a: ArrayKeys.A, b: ArrayKeys.B},
        outputs={c: ArrayKeys.C},
        gradients={a: ArrayKeys.GRADIENT_A},
        save_every=100,
    )
    pipeline = source + train
    request = BatchRequest(
        {
            ArrayKeys.A: ArraySpec(roi=Roi((0, 0), (2, 2))),
            ArrayKeys.B: ArraySpec(roi=Roi((0, 0), (2, 2))),
            ArrayKeys.C: ArraySpec(roi=Roi((0, 0), (2, 2))),
            ArrayKeys.GRADIENT_A: ArraySpec(roi=Roi((0, 0), (2, 2))),
        }
    )
    # train for a couple of iterations
    with build(pipeline):
        batch = pipeline.request_batch(request)
        self.assertAlmostEqual(batch.loss, 9.8994951)
        gradient_a = batch.arrays[ArrayKeys.GRADIENT_A].data
        self.assertTrue(gradient_a[0, 0] < gradient_a[0, 1])
        self.assertTrue(gradient_a[0, 1] < gradient_a[1, 0])
        self.assertTrue(gradient_a[1, 0] < gradient_a[1, 1])
        for i in range(200 - 1):
            loss1 = batch.loss
            batch = pipeline.request_batch(request)
            loss2 = batch.loss
            self.assertLess(loss2, loss1)
    # resume training
    with build(pipeline):
        for i in range(100):
            loss1 = batch.loss
            batch = pipeline.request_batch(request)
            loss2 = batch.loss
            self.assertLess(loss2, loss1)
    # predict
    # source = ExampleTensorflowTrainSource()
    # predict = Predict(
    # meta_base + '_checkpoint_300',
    # inputs={a: ArrayKeys.A, b: ArrayKeys.B},
    # outputs={c: ArrayKeys.C},
    # max_shared_memory=1024*1024)
    # pipeline = source + predict
    # request = BatchRequest({
    # ArrayKeys.A: ArraySpec(roi=Roi((0, 0), (2, 2))),
    # ArrayKeys.B: ArraySpec(roi=Roi((0, 0), (2, 2))),
    # ArrayKeys.C: ArraySpec(roi=Roi((0, 0), (2, 2))),
    # })
    # with build(pipeline):
    # prev_c = None
    # for i in range(100):
    # batch = pipeline.request_batch(request)
    # c = batch.arrays[ArrayKeys.C].data
    # if prev_c is not None:
    # self.assertTrue(np.equal(c, prev_c))
    # prev_c = c