code: def linear_annealing(
      optimizer: torch.optim.Optimizer,
      update: int,
      num_updates: int,
      initial_lr: float,
  ):
      frac = 1.0 - (update - 1.0) / num_updates
      lrnow = frac * initial_lr
      for pg in optimizer.param_groups:
          pg["lr"] = lrnow
  
file_path: pytorch-lightning/examples/fabric/reinforcement_learning/rl/utils.py
imports: import argparse
  import math
  import os
  from distutils.util import strtobool
  from typing import TYPE_CHECKING, Optional, Union
  import gymnasium
  import torch
  from torch.utils.tensorboard import SummaryWriter
label_desc: Use image node_id 3 for calling a global function with example usage: linear_annealing(optimizer, update, num_updates, initial_lr) without return types