class_docstr: Save collection of render frames.
docstr: Initialize a :class:`RenderCollection` instance.
  
  Args:
      env: The environment that is being wrapped
      pop_frames (bool): If true, clear the collection frames after .render() is called.
      Default value is True.
      reset_clean (bool): If true, clear the collection frames when .reset() is called.
      Default value is True.
docstr_tok: ["Initialize","a",":","class",":","`","RenderCollection","`","instance",".","Args",":","env",":","The","environment","that","is","being","wrapped","pop_frames","(","bool",")",":","If","true",",","clear","the","collection","frames","after",".render","(",")","is","called",".","Default","value","is","True",".","reset_clean","(","bool",")",":","If","true",",","clear","the","collection","frames","when",".reset","(",")","is","called",".","Default","value","is","True","."]
code: def __init__(
      self,
      env: gym.Env,
      pop_frames: bool = True,
      reset_clean: bool = True,
  ):
      """Initialize a :class:`RenderCollection` instance.
  
      Args:
          env: The environment that is being wrapped
          pop_frames (bool): If true, clear the collection frames after .render() is called.
          Default value is True.
          reset_clean (bool): If true, clear the collection frames when .reset() is called.
          Default value is True.
      """
      super().__init__(env)
      assert env.render_mode is not None
      assert not env.render_mode.endswith("_list")
      self.frame_list = []
      self.reset_clean = reset_clean
      self.pop_frames = pop_frames
  
imports: import gym
label_desc: Use image node_id 1 to create a new RenderCollection object from inherited base classes: gym with example: obj = RenderCollection(env, pop_frames, reset_clean)