code: def testPerArmActionBatchWithVariablesAndPolicyUpdate(
      self, batch_size, exploration_strategy
  ):
      a_value = tf.reshape(tf.range(36, dtype=tf.float32), shape=[6, 6])
      a_list = [tf.compat.v2.Variable(a_value)]
      a_new_list = [
          tf.compat.v2.Variable(a_value + _POLICY_VARIABLES_OFFSET)
      ]
      b_value = tf.constant([2, 2, 2, 2, 2, 2], dtype=tf.float32)
      b_list = [tf.compat.v2.Variable(b_value)]
      b_new_list = [
          tf.compat.v2.Variable(b_value + _POLICY_VARIABLES_OFFSET)
      ]
      num_samples_list = [
          tf.compat.v2.Variable(tf.constant([1], dtype=tf.float32))
      ]
      num_samples_new_list = [
          tf.compat.v2.Variable(
              tf.constant(
                  [1 + _POLICY_VARIABLES_OFFSET], dtype=tf.float32
              )
          )
      ]
      self.evaluate(tf.compat.v1.global_variables_initializer())
      policy = linear_policy.LinearBanditPolicy(
          self._action_spec,
          a_list,
          b_list,
          num_samples_list,
          self._per_arm_time_step_spec,
          exploration_strategy,
          accepts_per_arm_features=True,
      )
      self.assertLen(policy.variables(), 3)
  
      new_policy = linear_policy.LinearBanditPolicy(
          self._action_spec,
          a_new_list,
          b_new_list,
          num_samples_new_list,
          self._per_arm_time_step_spec,
          exploration_strategy,
          accepts_per_arm_features=True,
      )
      self.assertLen(new_policy.variables(), 3)
  
      self.evaluate(new_policy.update(policy))
  
      step_batch = self._per_arm_time_step_batch(batch_size=batch_size)
      action_step = policy.action(step_batch)
      new_action_step = new_policy.action(step_batch)
      self.assertEqual(
          action_step.action.shape, new_action_step.action.shape
      )
      self.assertEqual(
          action_step.action.dtype, new_action_step.action.dtype
      )
      actions_, new_actions_, info = self.evaluate(
          [action_step.action, new_action_step.action, action_step.info]
      )
      self.assertAllEqual(actions_, new_actions_)
      arm_obs = step_batch.observation[
          bandit_spec_utils.PER_ARM_FEATURE_KEY
      ]
      first_action = actions_[0]
      first_arm_features = arm_obs[0]
      self.assertAllEqual(
          info.chosen_arm_features[0], first_arm_features[first_action]
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tf_agents.bandits.policies import linear_bandit_policy
  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 time_step
  from tf_agents.utils import test_utils
label_desc: Use image node_id 17 for calling the LinearBanditPolicyTest obj's underlying member method code with example usage: obj.testPerArmActionBatchWithVariablesAndPolicyUpdate(batch_size, exploration_strategy) without return types