'Returns a list of targets that need to be removed remotely'

def _remote_target_ids_to_remove(self):

    target_ids = [t['id'] for t in self.targets]
    remote_targets = self.rule.list_targets()
    return [rt['id'] for rt in remote_targets if (rt['id'] not in target_ids)]
