code: def testTrainedPolicyWithMaxExplorationProbabilityHint(
      self, accepts_per_arm_features
  ):
      # Creates two agents, with and without `max_exploration_probability_hint`.
      agent_with_limited_exploration = self._create_agent(
          accepts_per_arm_features,
          exploitation_coefficient=0.1,
          max_exploration_probability_hint=0.05,
      )
      agent = self._create_agent(
          accepts_per_arm_features, exploitation_coefficient=0.1
      )
      # Initialize all variables and train the agents over one batch.
      self.evaluate(tf.compat.v1.global_variables_initializer())
      experience = self._generate_training_experience(
          accepts_per_arm_features
      )
      self.evaluate(
          agent_with_limited_exploration.train(experience, None).loss
      )
      self.evaluate(agent.train(experience, None).loss)
  
      batch_size = 1000
      observations = self._generate_observations(
          batch_size, accepts_per_arm_features
      )
      time_step = ts.restart(observations, batch_size)
  
      # With `max_exploration_probability_hint` set to 5%, the trained agent is
      # expected to choose greedy actions at least 95% of the time.
      action_step = agent_with_limited_exploration.policy.action(
          time_step, seed=1
      )
      actions = self.evaluate(action_step.action)
      p_info = self.evaluate(action_step.info)
      greedy_actions = np.argmax(p_info.predicted_rewards_mean, axis=1)
      self.assertNotAllEqual(actions, greedy_actions)
      # Sets the threshold to be smaller than 95% to be robust against random
      # sampling in the test.
      self.assertGreater(
          np.sum(actions == greedy_actions), batch_size * 0.9
      )
  
      # Without `max_exploration_probability_hint`, the agent is expected to
      # explore a lot due to few training data.
      action_step = agent.policy.action(time_step, seed=1)
      actions = self.evaluate(action_step.action)
      p_info = self.evaluate(action_step.info)
      greedy_actions = np.argmax(p_info.predicted_rewards_mean, axis=1)
      self.assertLess(
          np.sum(actions == greedy_actions), batch_size * 0.6
      )
  
imports: from typing import Optional
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tf_agents.bandits.agents import neural_falcon_agent
  from tf_agents.bandits.networks import global_and_arm_feature_network
  from tf_agents.bandits.specs import utils
  from tf_agents.networks import network
  from tf_agents.policies import utils
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
  from tf_agents.trajectories import trajectory
  from tf_agents.typing import types
label_desc: Use image node_id 11 for calling the NeuralFalconAgentTest obj's underlying member method code with example usage: obj.testTrainedPolicyWithMaxExplorationProbabilityHint(accepts_per_arm_features) without return types