class_docstr: An rgb-to-gray-scale conversion pre-processor.
  
  :param observation_space: The observation space to pre-process.
  :param rgb_dim: Dimension of the rgb channels.
class_docstr_tok: ["An","rgb-to-gray-scale","conversion","pre-processor",".",":","param","observation_space",":","The","observation","space","to","pre-process",".",":","param","rgb_dim",":","Dimension","of","the","rgb","channels","."]
docstr: implementation of :class:`~maze.core.wrappers.observation_preprocessing.preprocessors.base.PreProcessor` interface
          
docstr_tok: ["implementation","of",":","class",":","`","~maze.core.wrappers.observation_preprocessing.preprocessors.base.PreProcessor","`","interface"]
code: def process(self, observation: np.ndarray) -> np.ndarray:
      """implementation of :class:`~maze.core.wrappers.observation_preprocessing.preprocessors.base.PreProcessor` interface"""
      observation = np.swapaxes(
          observation, axis1=self.rgb_dim, axis2=-1
      )
      return np.dot(observation[..., 0:3], [0.299, 0.587, 0.114])
  
file_path: maze/maze/core/wrappers/observation_preprocessing/preprocessors/rgb2gray.py
imports: from typing import Tuple
  import numpy
  from gym import spaces
  from maze.core.wrappers.observation_preprocessing.preprocessors.base import PreProcessor
  from maze.core.annotations import override
label_desc: Use image node_id 4 for calling the Rgb2GrayPreProcessor obj's underlying member method code with example usage: obj.process(observation) and returns: np