Can't you avoid the if statement by having `state_dict.get('desired', 0)`?