code: def restore(
      self,
      save_model_dir=None,
      restore_train=False,
      restore_serve=False,
  ):
      if save_model_dir is None:
          save_model_dir = self._save_model_dir
      if restore_train:
          assert self._train is not None, "train is not enabled."
          with self.traingraph.tf_graph.as_default():
              self._optimistic_restore(
                  self._tf_train_sess,
                  os.path.join(save_model_dir, "model.ckpt"),
              )
      if restore_serve:
          assert self._serve is not None, "serve is not enabled."
          with self.servegraph.tf_graph.as_default():
              self._optimistic_restore(
                  self._tf_serve_sess,
                  os.path.join(save_model_dir, "model.ckpt"),
              )
  
imports: import tensorflow
  import numpy
  import os
label_desc: Use image node_id 8 for calling the Recommender obj's underlying member method code with example usage: obj.restore(save_model_dir, restore_train, restore_serve) without return types