code: def linear_decay_learning_rate(
      step, total_train_steps, initial_lr=0.1, offset=0
  ):
      """Linearly decay the learning rate to 0.
  
      DEPRECATED - use product_learning_rate instead with factors:
  
      [<initial_lr>,
       @learning_rate_schedules.linear_decay]
      learning_rate_schedules.linear.decay.steps_or_fraction = 1.0
  
  
      Args:
        step: a tf.scalar representing the step we want the learning rate for.
        total_train_steps: a number, the total number of training steps.
        initial_lr: initial learning rate. Decays from here.
        offset: a number used for finetuning. Starts the learning-rate decay
          schedule from this step forwards.
  
      Returns:
        a tf.Scalar, the learning rate for the step.
      """
      offset = tf.cast(offset, tf.float32)
      step = tf.cast(step, tf.float32)
  
      return initial_lr * tf.minimum(
          1.0, (total_train_steps - step) / (total_train_steps - offset)
      )
  
file_path: mesh/mesh_tensorflow/transformer/learning_rate_schedules.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import gin
  import tensorflow.compat.v1
label_desc: Use image node_id 7 for calling a global function with example usage: linear_decay_learning_rate(step, total_train_steps, initial_lr, offset) and returns: unknown