class_docstr: A Policy that has acts randomly and has stateful view requirements.
class_docstr_tok: ["A","Policy","that","has","acts","randomly","and","has","stateful","view","requirements","."]
code: def __init__(self, *args, **kwargs):
      super().__init__(*args, **kwargs)
      config = RLModuleConfig(
          action_space=self.action_space,
          model_config_dict={
              "max_seq_len": 50,
              "lstm_use_prev_action": False,
              "lstm_use_prev_reward": False,
          },
      )
      self.model = StatefulRandomRLModule(config=config)
  
      self.view_requirements = (
          self.model.update_default_view_requirements(
              self.view_requirements
          )
      )
  
imports: import numpy
  import tree
  from gymnasium.spaces import Box
  from ray.rllib.core.models.base import STATE_OUT
  from ray.rllib.core.rl_module.rl_module import RLModuleConfig
  from ray.rllib.examples.policy.random_policy import RandomPolicy
  from ray.rllib.examples.rl_module.episode_env_aware_rlm import StatefulRandomRLModule
  from ray.rllib.policy.policy import Policy
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.policy.view_requirement import ViewRequirement
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.numpy import convert_to_numpy
label_desc: Use image node_id 1 to create a new StatefulRandomPolicy object from inherited base classes: RandomPolicy with example: obj = StatefulRandomPolicy()