code: def rollout(env, model, n_trials):
      rewards = []
      actions = []
      observations = []
      for i in range(n_trials):
          obs = env.reset()
          state = (
              model.initial_state
              if hasattr(model, "initial_state")
              else None
          )
          episode_rew = []
          episode_actions = []
          episode_obs = []
          while True:
              if state is not None:
                  a, v, state, _ = model.step(obs, S=state, M=[False])
              else:
                  a, v, _, _ = model.step(obs)
  
              obs, rew, done, _ = env.step(a)
              episode_rew.append(rew)
              episode_actions.append(a)
              episode_obs.append(obs)
              if done:
                  break
          rewards.append(episode_rew)
          actions.append(episode_actions)
          observations.append(episode_obs)
      return observations, actions, rewards
  
imports: import tensorflow
  import numpy
  from baselines.common.vec_env.dummy_vec_env import DummyVecEnv
label_desc: Use image node_id 3 for calling a global function with example usage: rollout(env, model, n_trials) and returns: observations,  actions,  rewards