code: def linear_annealing(n, total, p_initial, p_final):
      """Linearly interpolates a probability between p_initial and p_final.
  
      Current probability is based on the current step, n. Used to linearly anneal
      the exploration probability of the RLTuner.
  
      Args:
        n: The current step.
        total: The total number of steps that will be taken (usually the length of
          the exploration period).
        p_initial: The initial probability.
        p_final: The final probability.
  
      Returns:
        The current probability (between p_initial and p_final).
      """
      if n >= total:
          return p_final
      else:
          return p_initial - (n * (p_initial - p_final)) / (total)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import random
  from magenta.contrib import training
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 5 for calling a global function with example usage: linear_annealing(n, total, p_initial, p_final) and returns: p_final, unknown