def discrete_to_mouse_action(discrete_action, mouse_speed):
    """Turn multidiscrete mouse action to float.

    Takes in value {0,1,2} and mouse speed, and returns one float scalar.
    """

    if discrete_action == 1:
        return -mouse_speed
    elif discrete_action == 2:
        return mouse_speed
    else:
        return 0