'Detach instances from an Auto Scaling group.
:type name: str
:param name: The name of the Auto Scaling group from which to detach instances.
:type instance_ids: list
:param instance_ids: Instance ids to be detached from the Auto Scaling group.
:type decrement_capacity: bool
:param decrement_capacity: Whether to decrement the size of the
Auto Scaling group or not.'

def detach_instances(self, name, instance_ids, decrement_capacity=True):

    params = {'AutoScalingGroupName': name}
    params['ShouldDecrementDesiredCapacity'] = ('true' if decrement_capacity else 'false')
    self.build_list_params(params, instance_ids, 'InstanceIds')
    return self.get_status('DetachInstances', params)
