docs: def render(self, mode='human'):
          """
          Render the environment.
  
          Args:
              mode (str): the mode to render with:
              - human: render to the current display
              - rgb_array: Return an numpy.ndarray with shape (x, y, 3),
                representing RGB values for an x-by-y pixel image
  
          Returns:
              a numpy array if mode is 'rgb_array', None otherwise
  
          """
          if mode == 'human':
              # if the viewer isn't setup, import it and create one
              if self.viewer is None:
                  from ._image_viewer import ImageViewer
                  # get the caption for the ImageViewer
                  if self.spec is None:
                      # if there is no spec, just use the .nes filename
                      caption = self._rom_path.split('/')[-1]
                  else:
                      # set the caption to the OpenAI Gym id
                      caption = self.spec.id
                  # create the ImageViewer to display frames
                  self.viewer = ImageViewer(
                      caption=caption,
                      height=SCREEN_HEIGHT,
                      width=SCREEN_WIDTH,
                  )
              # show the screen on the image viewer
              self.viewer.show(self.screen)
          elif mode == 'rgb_array':
              return self.screen
          else:
              # unpack the modes as comma delineated strings ('a', 'b', ...)
              render_modes = [repr(x) for x in self.metadata['render.modes']]
              msg = 'valid render modes are: {}'.format(', '.join(render_modes))
              raise NotImplementedError(msg)