class_docstr: An environment based on an arbitrary classification problem.
class_docstr_tok: ["An","environment","based","on","an","arbitrary","classification","problem","."]
code: def _observe(self) -> types.NestedTensor:
      context, lbl = eager_utils.get_next(self._data_iterator)
      self._previous_label.assign(self._current_label)
      self._current_label.assign(
          tf.reshape(
              tf.cast(lbl, dtype=self._label_dtype),
              shape=[self._batch_size],
          )
      )
      return tf.reshape(
          context,
          shape=[self._batch_size]
          + self._time_step_spec.observation.shape,
      )
  
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 2 for calling the ClassificationBanditEnvironment obj's underlying member method code with example usage: obj._observe() and returns: tf