code: def opt(opt_name):
      stepsize, gamma, delta = 0.1, 0.5, 0.8
  
      map = {
          "gd": GradientDescentOptimizer(stepsize),
          "nest": NesterovMomentumOptimizer(stepsize, momentum=gamma),
          "moment": MomentumOptimizer(stepsize, momentum=gamma),
          "ada": AdagradOptimizer(stepsize),
          "rms": RMSPropOptimizer(stepsize, decay=gamma),
          "adam": AdamOptimizer(stepsize, beta1=gamma, beta2=delta),
      }
  
      return map[opt_name]
  
file_path: pennylane/tests/optimize/test_optimize.py
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.optimize import GradientDescentOptimizer, MomentumOptimizer, NesterovMomentumOptimizer, AdagradOptimizer, RMSPropOptimizer, AdamOptimizer
label_desc: Use image node_id 1 for calling a global function with example usage: opt(opt_name) and returns: map