'Check whether all nodes are in a \'terminated\' state'

def is_cluster_terminated(self):

    states = filter((lambda x: (x != 'terminated')), static.INSTANCE_STATES)
    filters = {'instance.group-name': self._security_group, 'instance-state-name': states}
    insts = self.ec2.get_all_instances(filters=filters)
    return (len(insts) == 0)
