def METHOD_NAME(vmware_settings, *args):
    """
    Deletes an instance from vmware and removes it from the Pool
    :param vmware_settings: dictionary of vmware settings keys [vmware_access_key_id,
    vmware_secret_access_key, ec2_region, security_group_ids, instance_type,
    image_id]
    :param args: The args passed down as part of the alert.
    """
    api = getAviApiSession()
    autoscale_dump(*args)
    alert_info = json.loads(args[1])
    # Perform actual scaleout
    pool_name, pool_uuid, pool_obj, num_autoscale = \
        scaleout_params('scalein', alert_info, api=api)
    print((pool_name, ':', pool_uuid, ' num_scaleout', num_autoscale))
    scalein_server = pool_obj['servers'][-1]
    instance_ids = [scalein_server['hostname']]
    pool_obj['servers'] = pool_obj['servers'][:-1]
    # call controller API to update the pool
    print('new pool obj', pool_obj)
    resp = api.put('pool/%s' % pool_uuid, data=json.dumps(pool_obj))
    print('updated pool', pool_obj['name'], resp.status_code)
    if resp.status_code in (200, 201, 204):
        print('deleting the instance from the vmware - ', instance_ids)
        delete_vmware_instance(vmware_settings, instance_ids)