code: def structured_linear_reward_fn_generator(
      context_dim, num_actions, variance, drift_coefficient=0.1
  ):
      """A function that returns `num_actions` noisy linear functions.
  
      Every linear function is related to its previous one:
      ```
      theta_new = theta_previous + a * drift
      ```
  
      Args:
        context_dim: Number of parameters per function.
        num_actions: Number of functions returned.
        variance: Variance of the noisy linear functions.
        drift_coefficient: the amount of drift (see `a` in the formula above).
  
      Returns:
        A list of noisy linear functions that are related to each other.
      """
      theta_list = []
      theta_previous = np.random.rand(context_dim)
      theta_list.append(theta_previous)
      for _ in range(1, num_actions):
          drift = np.random.rand(context_dim)
          theta_new = theta_previous + drift_coefficient * drift
          theta_previous = theta_new.copy()
          theta_list.append(theta_new)
  
      return linear_reward_fn_generator(theta_list, variance)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import gin
  import numpy
  from six.moves import range
  import tensorflow
  from tf_agents.bandits.agents import utils
  from tf_agents.bandits.environments import wheel_py_environment
label_desc: Use image node_id 4 for calling a global function with example usage: structured_linear_reward_fn_generator(context_dim, num_actions, variance, drift_coefficient) and returns: linear_reward_fn_generator