code: def _parse_shape(self, space):
      
      if isinstance(space, gym.spaces.Discrete):
        return ()
      if isinstance(space, gym.spaces.Box):
        return space.shape
      raise NotImplementedError()
docs: Get a tensor shape from a OpenAI Gym space.
  
      Args:
        space: Gym space.
  
      Raises:
        NotImplementedError: For spaces other than Box and Discrete.
  
      Returns:
        Shape tuple.