code: def optimization(base_lr, loss, train_steps, optimizer="adam"):
      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)
  
file_path: PGL/legacy/examples/distribute_deepwalk/gpu_train.py
imports: import argparse
  import time
  import os
  import numpy
  import paddle.fluid
  import paddle.fluid.layers
  from pgl.utils.logger import log
  from model import DeepwalkModel
  from utils import build_graph
  from utils import build_gen_func
label_desc: Use image node_id 1 for calling a global function with example usage: optimization(base_lr, loss, train_steps, optimizer) without return types