def wrap_deepmind(env, episode_life=True, clip_rewards=True, frame_stack=False, scale=False):
    'Configure environment for DeepMind-style Atari.\n    '
    if episode_life:
        env = EpisodicLifeEnv(env)
    if ('FIRE' in env.unwrapped.get_action_meanings()):
        env = FireResetEnv(env)
    env = WarpFrame(env)
    if scale:
        env = ScaledFloatFrame(env)
    if clip_rewards:
        env = ClipRewardEnv(env)
    env = ImageToPyTorch(env)
    if frame_stack:
        env = FrameStack(env, 4)
    return env
Configure environment for DeepMind-style Atari.
def wrap_deepmind(env, episode_life=True, clip_rewards=True, frame_stack=False, scale=False):
    '\n    '
    if episode_life:
        env = EpisodicLifeEnv(env)
    if ('FIRE' in env.unwrapped.get_action_meanings()):
        env = FireResetEnv(env)
    env = WarpFrame(env)
    if scale:
        env = ScaledFloatFrame(env)
    if clip_rewards:
        env = ClipRewardEnv(env)
    env = ImageToPyTorch(env)
    if frame_stack:
        env = FrameStack(env, 4)
    return env