def describe_instance_status(self):
    instance_ids = instance_ids_from_querystring(self.querystring)
    include_all_instances = (optional_from_querystring('IncludeAllInstances', self.querystring) == 'true')
    if instance_ids:
        instances = self.ec2_backend.get_multi_instances_by_id(instance_ids)
    elif include_all_instances:
        instances = self.ec2_backend.all_instances()
    else:
        instances = self.ec2_backend.all_running_instances()
    template = self.response_template(EC2_INSTANCE_STATUS)
    return template.render(instances=instances)
def describe_instance_status(self):
    instance_ids = instance_ids_from_querystring(self.querystring)
    include_all_instances = (optional_from_querystring('IncludeAllInstances', self.querystring) == 'true')
    if instance_ids:
        instances = self.ec2_backend.get_multi_instances_by_id(instance_ids)
    elif include_all_instances:
        instances = self.ec2_backend.all_instances()
    else:
        instances = self.ec2_backend.all_running_instances()
    template = self.response_template(EC2_INSTANCE_STATUS)
    return template.render(instances=instances)