def get_corrected_commands(command):
 corrected_commands = (corrected for rule in get_rules() if rule.is_match(command) for corrected in rule.get_corrected_commands(command))
 return organize_commands(corrected_commands)

def get_corrected_commands ( command ) : corrected_commands = ( corrected for rule in get_rules ( ) if rule . is_match ( command ) for corrected in rule . get_corrected_commands ( command ) ) return organize_commands ( corrected_commands )
returns generator with sorted and unique corrected commands .