class_docstr: Base class for Bandit Python environments.
  
  Every bandit Python environment should derive from this class.
  Subclasses need to implement functions _observe() and _apply_action().
  
  Usage:
  
  To receive the first observation, the environment's reset() function should be
  called. To take an action, use the step(action) function. The time step
  returned by step(action) will contain the reward and the next observation.
class_docstr_tok: ["Base","class","for","Bandit","Python","environments",".","Every","bandit","Python","environment","should","derive","from","this","class",".","Subclasses","need","to","implement","functions","_observe","(",")","and","_apply_action","(",")",".","Usage",":","To","receive","the","first","observation",",","the","environment","'s","reset","(",")","function","should","be","called",".","To","take","an","action",",","use","the","step","(","action",")","function",".","The","time","step","returned","by","step","(","action",")","will","contain","the","reward","and","the","next","observation","."]
docstr: Returns a time step containing the reward for the action taken.
  
  The returning time step also contains the next observation.
  It should not be overridden by bandit environment implementations.
  
  Args:
    action: The action taken by the Bandit policy.
  
  Returns:
    A time step of type LAST containing the reward for the action taken and
    the next observation.
docstr_tok: ["Returns","a","time","step","containing","the","reward","for","the","action","taken",".","The","returning","time","step","also","contains","the","next","observation",".","It","should","not","be","overridden","by","bandit","environment","implementations",".","Args",":","action",":","The","action","taken","by","the","Bandit","policy",".","Returns",":","A","time","step","of","type","LAST","containing","the","reward","for","the","action","taken","and","the","next","observation","."]
code: def _step(self, action: types.NestedArray) -> ts.TimeStep:
      """Returns a time step containing the reward for the action taken.
  
      The returning time step also contains the next observation.
      It should not be overridden by bandit environment implementations.
  
      Args:
        action: The action taken by the Bandit policy.
  
      Returns:
        A time step of type LAST containing the reward for the action taken and
        the next observation.
      """
      # This step will take an action and return a reward.
      reward = self._apply_action(action)
      return ts.termination(self._observe(), reward)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  from typing import Optional, Text
  import numpy
  import tensorflow
  from tf_agents.environments import py_environment
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
label_desc: Use image node_id 3 for calling the BanditPyEnvironment obj's underlying member method code with example usage: obj._step(action) and returns: ts