def CropObservations(env):
 if env.spec.tags.get('flashgames', False):
  spec = runtime_spec('flashgames').server_registry[env.spec.id]
  return _CropObservations(env, x=18, y=84, height=spec['height'], width=spec['width'])
 elif (env.spec.tags.get('atari', False) and env.spec.tags.get('vnc', False)):
  return _CropObservations(env, height=194, width=160)
 else:
  return env

def CropObservations ( env ) : if env . spec . tags . get ( 'flashgames' , False ) : spec = runtime_spec ( 'flashgames' ) . server_registry [ env . spec . id ] return _CropObservations ( env , x = 18 , y = 84 , height = spec [ 'height' ] , width = spec [ 'width' ] ) elif ( env . spec . tags . get ( 'atari' , False ) and env . spec . tags . get ( 'vnc' , False ) ) : return _CropObservations ( env , height = 194 , width = 160 ) else : return env
crops the visual observations of an environment so that they only contain the game screen .