class_docstr: Stationary Stochastic Bandit environment with structured features.
  
  This environment can generate global and per-arm observations of any nested
  structure.
class_docstr_tok: ["Stationary","Stochastic","Bandit","environment","with","structured","features",".","This","environment","can","generate","global","and","per-arm","observations","of","any","nested","structure","."]
code: def _observe(self) -> types.NestedArray:
      global_obs = self._generate_batch_of_observations(
          self._global_context_sampling_fn, self._batch_size
      )
      arm_obs = self._generate_batch_of_observations(
          self._arm_context_sampling_fn,
          self._batch_size * self._num_actions,
      )
      arm_obs = tf.nest.map_structure(
          lambda x: x.reshape(
              (self.batch_size, self._num_actions) + x.shape[1:]
          ),
          arm_obs,
      )
      self._observation = {GLOBAL_KEY: global_obs, PER_ARM_KEY: arm_obs}
      return self._observation
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Callable, Optional, Sequence, Text
  import gin
  import numpy
  import tensorflow
  from tf_agents.bandits.environments import bandit_py_environment
  from tf_agents.bandits.specs import utils
  from tf_agents.specs import array_spec
  from tf_agents.typing import types
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 5 for calling the StationaryStochasticStructuredPyEnvironment obj's underlying member method code with example usage: obj._observe() and returns: self