A simpler fix would be     ```  if module.params['retention'] != found_log_group.get('retentionInDays'):  ```    wouldn't it?    I'm not at all convinced of the need to reformat the call to `input_retention_policy` - PEP8 does not express a preference either way: https://www.python.org/dev/peps/pep-0008/#id17.