code: def execute_experiments(
      optimizers, objective, func, plot_func, initial_state, seed=1
  ):
      seed = seed
      for item in optimizers:
          optimizer_class, lr_low, lr_hi = item
          space = {
              "optimizer_class": hp.choice(
                  "optimizer_class", [optimizer_class]
              ),
              "lr": hp.loguniform("lr", lr_low, lr_hi),
          }
          best = fmin(
              fn=objective,
              space=space,
              algo=tpe.suggest,
              max_evals=200,
              rstate=np.random.RandomState(seed),
          )
          print(best["lr"], optimizer_class)
  
          steps = execute_steps(
              func,
              initial_state,
              optimizer_class,
              {"lr": best["lr"]},
              num_iter=500,
          )
          plot_func(steps, optimizer_class.__name__, best["lr"])
  
file_path: pytorch-optimizer/examples/viz_optimizers.py
imports: import math
  import matplotlib.pyplot
  import numpy
  import torch
  from hyperopt import fmin, hp, tpe
  import torch_optimizer
label_desc: Use image node_id 8 for calling a global function with example usage: execute_experiments(optimizers, objective, func, plot_func, initial_state, seed) without return types