class_docstr: An environment wrapper that adds action masks to observations.
class_docstr_tok: ["An","environment","wrapper","that","adds","action","masks","to","observations","."]
code: def _apply_action(self, action):
      self._check_action_with_mask(action)
      # pylint: disable=protected-access
      reward = self.original_environment._apply_action(action)
      return reward
  
file_path: agents/tf_agents/bandits/environments/bernoulli_action_mask_tf_environment.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Callable
  import gin
  import tensorflow
  import tensorflow_probability
  from tf_agents.bandits.environments import bandit_tf_environment
  from tf_agents.policies import utils
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
  from tf_agents.utils import common
label_desc: Use image node_id 4 for calling the BernoulliActionMaskTFEnvironment obj's underlying member method code with example usage: obj._apply_action(action) and returns: reward