'If there are nodes to remove, it figures out which need to be removed'

def _get_nodes_to_remove(self):

    num_nodes_to_remove = (self.data['NumCacheNodes'] - self.num_nodes)
    if (num_nodes_to_remove <= 0):
        return None
    if (not self.hard_modify):
        msg = "'%s'    requires    removal    of    cache    nodes.    'hard_modify'    must    be    set    to    true    to    proceed."
        self.module.fail_json(msg=(msg % self.name))
    cache_node_ids = [cn['CacheNodeId'] for cn in self.data['CacheNodes']]
    return cache_node_ids[(- num_nodes_to_remove):]
