code: def testUpdateAandBWithForgetting(
      self, batch_size, context_dim, gamma
  ):
      a_prev = tf.eye(context_dim, dtype=tf.float64)
      b_prev = tf.ones(shape=[context_dim], dtype=tf.float64)
      r = tf.random.stateless_uniform(
          shape=[batch_size],
          seed=(2, 3),
          minval=0.0,
          maxval=10.0,
          dtype=tf.float64,
      )
      x = tf.random.stateless_normal(
          shape=[batch_size, context_dim], seed=(2, 3), dtype=tf.float64
      )
      a_new, b_new = linear_agent.update_a_and_b_with_forgetting(
          a_prev, b_prev, r, x, gamma
      )
      expected_a_new = a_prev * gamma + tf.matmul(
          x, x, transpose_a=True
      )
      expected_b_new = (
          b_prev * gamma
          + bandit_utils.sum_reward_weighted_observations(r, x)
      )
      self.assertAllClose(
          self.evaluate(a_new), self.evaluate(expected_a_new)
      )
      self.assertAllClose(
          self.evaluate(b_new), self.evaluate(expected_b_new)
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from typing import Optional, Tuple
  from absl import flags
  from absl.testing import parameterized
  import numpy
  import tensorflow
  import tensorflow_probability
  from tf_agents.bandits.agents import lin_ucb_agent
  from tf_agents.bandits.agents import linear_bandit_agent
  from tf_agents.bandits.agents import linear_thompson_sampling_agent
  from tf_agents.bandits.agents import utils
  from tf_agents.bandits.drivers import driver_utils
  from tf_agents.bandits.specs import utils
  from tf_agents.policies import utils
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import policy_step
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
  from tf_agents.utils import common
label_desc: Use image node_id 15 for calling the LinearBanditAgentTest obj's underlying member method code with example usage: obj.testUpdateAandBWithForgetting(batch_size, context_dim, gamma) without return types