code: def test_estimator_graph_tensorboard(self):
      tf.reset_default_graph()
  
      model = SimpleModel()
  
      file_path = os.path.join(resource_path, "orca/learn/ncf.csv")
      data_shard = zoo.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)
  
      temp = tempfile.mkdtemp()
      # only set model dir, summary generated under model dir
      model_dir = os.path.join(temp, "test_model")
  
      est = Estimator.from_graph(
          inputs=[model.user, model.item],
          labels=[model.label],
          loss=model.loss,
          optimizer=tf.train.AdamOptimizer(),
          metrics={"loss": model.loss},
          model_dir=model_dir,
      )
      est.fit(
          data=data_shard,
          batch_size=8,
          epochs=5,
          validation_data=data_shard,
      )
  
      train_tp = est.get_train_summary("Throughput")
      val_scores = est.get_validation_summary("loss")
      assert len(train_tp) > 0
      assert len(val_scores) > 0
  
      # set tensorboard dir to different directory
      est.set_tensorboard("model", "test")
  
      est.fit(
          data=data_shard,
          batch_size=8,
          epochs=5,
          validation_data=data_shard,
      )
  
      train_tp = est.get_train_summary("Throughput")
      val_scores = est.get_validation_summary("loss")
      assert len(train_tp) > 0
      assert len(val_scores) > 0
  
      # no model dir, no tensorboard dir, no summary saved
      est2 = Estimator.from_graph(
          inputs=[model.user, model.item],
          labels=[model.label],
          loss=model.loss,
          optimizer=tf.train.AdamOptimizer(),
          metrics={"loss": model.loss},
      )
  
      est2.fit(
          data=data_shard,
          batch_size=8,
          epochs=5,
          validation_data=data_shard,
      )
  
      train_tp = est2.get_train_summary("Throughput")
      val_scores = est2.get_validation_summary("loss")
      assert train_tp is None
      assert val_scores is None
  
      shutil.rmtree(temp)
  
imports: import os
  import shutil
  import tempfile
  from unittest import TestCase
  import numpy
  import tensorflow
  from zoo.orca.learn.trigger import SeveralIteration
  from pyspark.sql.context import SQLContext
  import zoo.orca.data.pandas
  from zoo import init_nncontext
  from zoo.orca import OrcaContext
  from zoo.orca.data.tf.data import Dataset
  from zoo.orca.learn.tf.estimator import Estimator
  from zoo.util.tf import save_tf_checkpoint, load_tf_checkpoint, get_checkpoint_state
label_desc: Use image node_id 17 for calling the TestEstimatorForGraph obj's underlying member method code with example usage: obj.test_estimator_graph_tensorboard() and returns: result