code: def current_lr(optim):
      return (
          optim.param_groups[0]["lr"]
          if hasattr(optim, "param_groups")
          else optim.lr
      )
  
imports: import numpy
  import torch
  import unittest
  from tinygrad.tensor import Tensor
  from tinygrad.nn.state import get_parameters
  from tinygrad.nn.optim import Adam
  from extra.lr_scheduler import MultiStepLR, ReduceLROnPlateau, CosineAnnealingLR, OneCycleLR
  from extra.training import train, evaluate
  from extra.datasets import fetch_mnist
label_desc: Use image node_id 2 for calling a global function with example usage: current_lr(optim) and returns: unknown