code: def choose_optimizer(optimizer_name, bounds):
          
          if optimizer_name == 'lbfgs':
              optimizer = OptLbfgs(bounds)
  
          elif optimizer_name == 'DIRECT':
              optimizer = OptDirect(bounds)
  
          elif optimizer_name == 'CMA':
              optimizer = OptCma(bounds)
          else:
              raise InvalidVariableNameError('Invalid optimizer selected.')
  
          return optimizer
docs: Selects the type of local optimizer