code: def _test_rectification_term():
      """
      ### Plot $r_t$ against $t$ for various $\beta_2$
  
      ![Plot of r_t](radam_r_t.png)
      """
      import matplotlib.pyplot as plt
      import numpy as np
  
      beta2 = [0.9999, 0.999, 0.99, 0.9, 0.8, 0.6, 0.5]
      plt.plot(
          np.arange(1, 5_000),
          [
              [RAdam.calc_rectification_term(b, i) for b in beta2]
              for i in range(1, 5_000)
          ],
      )
      plt.legend(beta2)
      plt.title("Optimizer")
      plt.show()
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/optimizers/radam.py
imports: import math
  from typing import Dict, Optional
  import torch
  from labml_nn.optimizers import WeightDecay
  from labml_nn.optimizers.amsgrad import AMSGrad
label_desc: Use image node_id 1 for calling a global function with example usage: _test_rectification_term() without return types