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 _generate_batch_of_observations(self, generator_fn, num_samples):
      unstacked_obs = [generator_fn() for _ in range(num_samples)]
      return nest_utils.stack_nested_arrays(unstacked_obs)
  
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 4 for calling the StationaryStochasticStructuredPyEnvironment obj's underlying member method code with example usage: obj._generate_batch_of_observations(generator_fn, num_samples) and returns: nest_utils