def METHOD_NAME(env):
    logging.info(
        "observation_spec: %s" % pprint.pformat(env.observation_spec()))
    logging.info(
        "observation_desc: %s" % pprint.pformat(env.observation_desc()))
    logging.info("action_spec: %s" % pprint.pformat(env.action_spec()))
    logging.info("action_desc: %s" % pprint.pformat(env.action_desc()))
    logging.info("Keyboard control:" + """
    W/UP         : throttle
    S/DOWN       : brake
    A/LEFT       : steer left
    D/RIGHT      : steer right
    SPACE        : steer ahead
    Q            : toggle reverse
    ESC          : quit
    """)
    action = env.action_spec().zeros([env.batch_size])
    THROTTLE = 0
    STEER = 1
    BRAKE = 2
    REVERSE = 3
    import pygame
    import pygame.locals as K
    pygame.init()
    pygame.font.init()
    clock = pygame.time.Clock()
    steer = 0.
    stopping = False
    while not stopping:
        clock.tick_busy_loop(1000)
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                stopping = True
                break
            if event.type != pygame.KEYUP:
                continue
            if event.key == K.K_ESCAPE:
                stopping = True
                break
            if event.key == K.K_q:
                action[:, REVERSE] = 1 - action[:, REVERSE]
            if event.key == K.K_SPACE:
                steer = 0.
        keys = pygame.key.get_pressed()
        if keys[K.K_UP] or keys[K.K_w]:
            action[:, THROTTLE] = torch.min(action[:, THROTTLE] + 0.01,
                                            torch.tensor(1.))
        else:
            action[:, THROTTLE] = 0
        if keys[K.K_DOWN] or keys[K.K_s]:
            action[:, BRAKE] = torch.min(action[:, BRAKE] + 0.2,
                                         torch.tensor(1.))
        else:
            action[:, BRAKE] = 0
        steer_increment = 0.005
        if keys[K.K_LEFT] or keys[K.K_a]:
            if steer > 0:
                steer = 0
            else:
                steer -= steer_increment
        elif keys[K.K_RIGHT] or keys[K.K_d]:
            if steer < 0:
                steer = 0
            else:
                steer += steer_increment
        steer = min(0.7, max(-0.7, steer))
        action[:, STEER] = steer
        time_step = env.step(action)
        if time_step.step_type[0] == alf.data_structures.StepType.LAST:
            action = env.action_spec().zeros([env.batch_size])
            steer = 0.
        env.render("human")