class_docstr: A randomly acting environment that publishes an action-mask each step.
code: def step(self, action):
      # Check whether action is valid.
      if not self.valid_actions[action]:
          raise ValueError(
              f"Invalid action ({action}) sent to env! "
              f"valid_actions={self.valid_actions}"
          )
      obs, rew, done, truncated, info = super().step(action)
      self._fix_action_mask(obs)
      return obs, rew, done, truncated, info
  
file_path: ray/python/ray/rllib/examples/env/action_mask_env.py
imports: from gymnasium.spaces import Box, Dict, Discrete
  import numpy
  from ray.rllib.examples.env.random_env import RandomEnv
label_desc: Use image node_id 3 for calling the ActionMaskEnv obj's underlying member method code with example usage: obj.step(action) and returns: obs,  rew,  done,  truncated,  info