code: def __iter__(self):
      self.env.reset()
      for i in range(self.num_episodes):
          trajectory = run_episode(
              self.env, self.agent, max_steps=self.max_steps, mdp_id=i
          )
          yield trajectory.to_dict()
  
file_path: ReAgent/reagent/gym/datasets/episodic_dataset.py
imports: import logging
  from typing import Optional
  import torch
  from reagent.gym.agents.agent import Agent
  from reagent.gym.envs.gym import Gym
  from reagent.gym.runners.gymrunner import run_episode
label_desc: Use image node_id 2 for calling the EpisodicDataset obj's underlying member method code with example usage: obj.__iter__() without return types