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 get_initial_state(self):
      if self.config.get("_enable_new_api_stack", False):
          # convert the tree of tensors to a tree to numpy arrays
          return tree.map_structure(
              lambda s: convert_to_numpy(s),
              self.model.get_initial_state(),
          )
  
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 3 for calling the StatefulRandomPolicy obj's underlying member method code with example usage: obj.get_initial_state() and returns: tree