code: def optimization(base_lr, loss, train_steps, optimizer="adam"):
      """optimization"""
      decayed_lr = L.polynomial_decay(base_lr, train_steps, 0.0001)
  
      if optimizer == "sgd":
          optimizer = F.optimizer.SGD(
              decayed_lr,
              regularization=F.regularizer.L2DecayRegularizer(
                  regularization_coeff=0.0025
              ),
          )
      elif optimizer == "adam":
          # dont use gpu's lazy mode
          optimizer = F.optimizer.Adam(decayed_lr)
      else:
          raise ValueError
  
      log.info("learning rate:%f" % (base_lr))
      optimizer.minimize(loss)
  
imports: import argparse
  import time
  import os
  import glob
  import numpy
  import paddle.fluid
  import paddle.fluid.layers
  from pgl.utils.logger import log
  from pgl.graph import Graph
  from pgl.sample import graph_alias_sample_table
  from pgl import data_loader
  import mp_reader
  from reader import GESReader
  from model import GESModel
label_desc: Use image node_id 3 for calling a global function with example usage: optimization(base_lr, loss, train_steps, optimizer) without return types