code: def get_optim(opt, optimizer_config, init_params):
      """convenience function for creating optimizer functions from configs"""
      lrate_init = optimizer_config.get("lrate_init", 1e-3)
      lrate_limit = optimizer_config.get("lrate_limit", 1e-6)
      decay_coef = optimizer_config.get("decay_coef", 1)
      step_size = lambda x: jnp.maximum(
          lrate_init * jnp.power(decay_coef, x), lrate_limit
      )
  
      if opt == "sgd":
          opt_init, opt_update, get_params = optimizers.sgd(
              step_size=step_size,
          )
      elif opt == "adam":
          opt_init, opt_update, get_params = optimizers.adam(
              step_size=step_size,
              b1=optimizer_config.get("beta1", 0.9),
              b2=optimizer_config.get("beta2", 0.999),
              eps=optimizer_config.get("epsilon", 1e-8),
          )
      else:
          raise Exception(
              "optimizer not supported. Choose between sgd and adam"
          )
      opt_state = jax.jit(opt_init)(init_params)
      opt_update = jax.jit(opt_update)
      get_params = jax.jit(get_params)
  
      return opt_state, opt_update, get_params
  
file_path: evojax/evojax/algo/ars_native.py
imports: import jax
  import jax.numpy
  import numpy
  from evojax.algo.base import NEAlgorithm
  from typing import Union
  import logging
  from evojax.util import create_logger
label_desc: Use image node_id 1 for calling a global function with example usage: get_optim(opt, optimizer_config, init_params) and returns: opt_state,  opt_update,  get_params