code: def build(self):
      if self._train:
          self.traingraph.build()
          with self.traingraph.tf_graph.as_default():
              config = tf.ConfigProto()
              config.gpu_options.allow_growth = True
              self._tf_train_sess = tf.Session(config=config)
              self._tf_train_sess.run(tf.global_variables_initializer())
              self._tf_train_saver = tf.train.Saver(
                  tf.global_variables(), max_to_keep=10
              )
  
      if self._serve:
          self.servegraph.build()
          with self.servegraph.tf_graph.as_default():
              config = tf.ConfigProto()
              config.gpu_options.allow_growth = True
              self._tf_serve_sess = tf.Session(config=config)
              self._tf_serve_sess.run(tf.global_variables_initializer())
              self._tf_serve_saver = tf.train.Saver(
                  tf.global_variables(), max_to_keep=10
              )
  
      if self._init_model_dir is not None:
          self.restore(
              save_model_dir=self._init_model_dir,
              restore_train=self._train,
              restore_serve=self._serve,
          )
  
      self._flag_isbuilt = True
  
      return self
  
imports: import tensorflow
  import numpy
  import os
label_desc: Use image node_id 11 for calling the Recommender obj's underlying member method code with example usage: obj.build() and returns: self