code: def set_learning_rate(optimizer, lr):
      for i, param_group in enumerate(optimizer.param_groups):
          param_group["lr"] = lr
  
imports: import math
  import warnings
  import numpy
  from torch import nn
  from torch.optim.optimizer import Optimizer
  from torch.optim.lr_scheduler import _LRScheduler, LambdaLR, ExponentialLR, CyclicLR, MultiStepLR, ReduceLROnPlateau, CosineAnnealingLR, CosineAnnealingWarmRestarts
label_desc: Use image node_id 1 for calling a global function with example usage: set_learning_rate(optimizer, lr) without return types