code: def _test_noam_optimizer():
      import matplotlib.pyplot as plt
      import numpy as np
  
      opts = [
          NoamOpt(512, 1, 4000, None),
          NoamOpt(512, 1, 8000, None),
          NoamOpt(2048, 1, 2000, None),
      ]
      plt.plot(
          np.arange(1, 20000),
          [[opt.rate(i) for opt in opts] for i in range(1, 20000)],
      )
      plt.legend(["512:4000", "512:8000", "256:4000"])
      plt.title("Optimizer")
      plt.show()
  
file_path: labml/helpers/labml_helpers/optimizer.py
imports: from typing import Tuple
  import torch
  from labml import tracker
  from labml.configs import BaseConfigs, option, meta_config
label_desc: Use image node_id 4 for calling a global function with example usage: _test_noam_optimizer() without return types