code: def build_optimizer(learning_rate, opt_name, opt_param):
      if opt_name == "momentum":
          return tf.train.MomentumOptimizer(learning_rate, **opt_param)
      elif opt_name == "adam":
          return tf.train.AdamOptimizer(learning_rate, **opt_param)
      else:
          raise ValueError(
              "Do not support the optimizer type: %s" % opt_name
          )
  
imports: import os
  import shutil
  import tensorflow
  import numpy
  import time
  from datetime import timedelta
  import json
  import pickle
label_desc: Use image node_id 25 for calling the BasicModel obj's underlying member method code with example usage: obj.build_optimizer(learning_rate, opt_name, opt_param) and returns: tf, tf