code: def _create_episode(
      self, num_data, t_started=None, len_lookback_buffer=0
  ):
      # Sample 100 values and initialize episode with observations and infos.
      env = gym.make("CartPole-v1")
      # Initialize containers.
      observations = []
      rewards = []
      actions = []
      infos = []
      extra_model_outputs = defaultdict(list)
  
      # Initialize observation and info.
      init_obs, init_info = env.reset()
      observations.append(init_obs)
      infos.append(init_info)
      # Run n samples.
      for _ in range(num_data):
          action = env.action_space.sample()
          obs, reward, _, _, info = env.step(action)
          observations.append(obs)
          actions.append(action)
          rewards.append(reward)
          infos.append(info)
          extra_model_outputs["extra_1"].append(np.random.random())
          extra_model_outputs["state_out"].append(np.random.random())
  
      return SingleAgentEpisode(
          observations=observations,
          infos=infos,
          actions=actions,
          rewards=rewards,
          extra_model_outputs=extra_model_outputs,
          t_started=t_started,
          len_lookback_buffer=len_lookback_buffer,
      )
  
imports: from collections import defaultdict
  from typing import Any, Dict, Optional, SupportsFloat, Tuple
  import unittest
  import gymnasium
  from gymnasium.core import ActType, ObsType
  import numpy
  from ray.rllib.env.single_agent_episode import SingleAgentEpisode
  from ray.rllib.utils.test_utils import check
label_desc: Use image node_id 7 for calling the TestSingelAgentEpisode obj's underlying member method code with example usage: obj._create_episode(num_data, t_started, len_lookback_buffer) and returns: SingleAgentEpisode