class_docstr: An environment based on an arbitrary classification problem.
class_docstr_tok: ["An","environment","based","on","an","arbitrary","classification","problem","."]
code: def compute_optimal_reward(self) -> types.NestedTensor:
      return tf.gather(
          params=self._optimal_reward_table,
          indices=self._previous_label,
      )
  
file_path: agents/tf_agents/bandits/environments/classification_environment.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Optional, Text
  import gin
  import tensorflow
  import tensorflow_probability
  from tf_agents.bandits.environments import bandit_tf_environment
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
  from tf_agents.utils import eager_utils
label_desc: Use image node_id 5 for calling the ClassificationBanditEnvironment obj's underlying member method code with example usage: obj.compute_optimal_reward() and returns: tf