def cluster_scale_in(base, cluster_id, count=None, expected_status=
    'SUCCEEDED', wait_timeout=None):
    """Utility function that scale in cluster."""
    params = {'scale_in': {'count': count}}
    res = base.client.trigger_action('clusters', cluster_id, params=params)
    action_id = res['location'].split('/actions/')[1]
    res = base.client.wait_for_status('actions', action_id, expected_status,
        wait_timeout)
    return res['body']['status_reason'], action_id
