class_docstr: A Plotter for rendering Atari 2600 frames.
class_docstr_tok: ["A","Plotter","for","rendering","Atari","2600","frames","."]
docstr: Render the Atari 2600 frame.
  
  Returns:
    object to be rendered by AgentVisualizer.
docstr_tok: ["Render","the","Atari","2600","frame",".","Returns",":","object","to","be","rendered","by","AgentVisualizer","."]
code: def draw(self):
      """Render the Atari 2600 frame.
  
      Returns:
        object to be rendered by AgentVisualizer.
      """
      environment = self.parameters["environment"]
      numpy_surface = np.frombuffer(
          self.game_surface.get_buffer(), dtype=np.int32
      )
      obs = environment.render(mode="rgb_array").astype(np.int32)
      obs = np.transpose(obs)
      obs = np.swapaxes(obs, 1, 2)
      obs = obs[2] | (obs[1] << 8) | (obs[0] << 16)
      np.copyto(numpy_surface, obs.ravel())
      return pygame.transform.scale(
          self.game_surface,
          (self.parameters["width"], self.parameters["height"]),
      )
  
file_path: dopamine/dopamine/utils/atari_plotter.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from dopamine.utils import plotter
  import gin
  import numpy
  import pygame
label_desc: Use image node_id 2 for calling the AtariPlotter obj's underlying member method code with example usage: obj.draw() and returns: pygame