class_docstr: A class implementing image preprocessing for Atari 2600 agents.
  
  Specifically, this provides the following subset from the JAIR paper
  (Bellemare et al., 2013) and Nature DQN paper (Mnih et al., 2015):
  
    * Frame skipping (defaults to 4).
    * Terminal signal when a life is lost (off by default).
    * Grayscale and max-pooling of the last two frames.
    * Downsample the screen to a square image (defaults to 84x84).
  
  More generally, this class follows the preprocessing guidelines set down in
  Machado et al. (2018), "Revisiting the Arcade Learning Environment:
  Evaluation Protocols and Open Problems for General Agents".
docstr: Returns the current observation in grayscale.
  
  The returned observation is stored in 'output'.
  
  Args:
    output: numpy array, screen buffer to hold the returned observation.
  
  Returns:
    observation: numpy array, the current observation in grayscale.
docstr_tok: ["Returns","the","current","observation","in","grayscale",".","The","returned","observation","is","stored","in","'output","'",".","Args",":","output",":","numpy","array",",","screen","buffer","to","hold","the","returned","observation",".","Returns",":","observation",":","numpy","array",",","the","current","observation","in","grayscale","."]
code: def _fetch_grayscale_observation(self, output):
      """Returns the current observation in grayscale.
  
      The returned observation is stored in 'output'.
  
      Args:
        output: numpy array, screen buffer to hold the returned observation.
  
      Returns:
        observation: numpy array, the current observation in grayscale.
      """
      self.env.ale.getScreenGrayscale(output)
      return output
  
file_path: agents/tf_agents/environments/atari_preprocessing.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import cv2
  import gin
  import gym
  from gym import core
  from gym.spaces import box
  import numpy
label_desc: Use image node_id 4 for calling the AtariPreprocessing obj's underlying member method code with example usage: obj._fetch_grayscale_observation(output) and returns: output