def METHOD_NAME(self, key, modifiers):
    """Called when the user releases a key. """
    if key == arcade.key.UP:
        self.up_pressed = False
        self.update_player_speed()
    elif key == arcade.key.DOWN:
        self.down_pressed = False
        self.update_player_speed()
    elif key == arcade.key.LEFT:
        self.left_pressed = False
        self.update_player_speed()
    elif key == arcade.key.RIGHT:
        self.right_pressed = False
        self.update_player_speed()