code: def test_estimator_graph_with_bigdl_optim_method(self):
      import bigdl.orca.data.pandas
  
      tf.reset_default_graph()
  
      model = SimpleModel()
      file_path = os.path.join(resource_path, "orca/learn/ncf.csv")
      data_shard = bigdl.orca.data.pandas.read_csv(file_path)
  
      def transform(df):
          result = {
              "x": (df["user"].to_numpy(), df["item"].to_numpy()),
              "y": df["label"].to_numpy(),
          }
          return result
  
      data_shard = data_shard.transform_shard(transform)
      from bigdl.orca.learn.optimizers import SGD
      from bigdl.orca.learn.optimizers.schedule import Plateau
  
      sgd = SGD(
          learningrate=0.1,
          learningrate_schedule=Plateau(
              "score",
              factor=0.1,
              patience=10,
              mode="min",
          ),
      )
      est = Estimator.from_graph(
          inputs=[model.user, model.item],
          labels=[model.label],
          outputs=[model.logits],
          loss=model.loss,
          optimizer=sgd,
          metrics={"loss": model.loss},
      )
      est.fit(
          data=data_shard,
          batch_size=8,
          epochs=10,
          validation_data=data_shard,
      )
  
imports: import os
  import shutil
  import tempfile
  from unittest import TestCase
  import numpy
  import tensorflow
  from bigdl.orca.learn.trigger import SeveralIteration
  from pyspark.sql.context import SQLContext
  import bigdl.orca.data.pandas
  from bigdl.dllib.nncontext import init_nncontext
  from bigdl.orca import OrcaContext
  from bigdl.orca.data.tf.data import Dataset
  from bigdl.orca.learn.tf.estimator import Estimator
  from bigdl.dllib.utils.tf import save_tf_checkpoint, load_tf_checkpoint, get_checkpoint_state
label_desc: Use image node_id 20 for calling the TestEstimatorForGraph obj's underlying member method code with example usage: obj.test_estimator_graph_with_bigdl_optim_method() and returns: result