def _cluster_to_full_summary(cluster, now=None):
    cs = _cluster_to_basic_summary(cluster, now=now)

    cs['usage'] = _cluster_to_usage_data(
        cluster, basic_summary=cs, now=now)

    # add up billing info
    if cs['end']:
        # avoid rounding errors if the job is done
        cs['nih_billed'] = cs['nih']
    else:
        cs['nih_billed'] = float(sum(u['nih_billed'] for u in cs['usage']))

    for nih_type in ('nih_used', 'nih_bbnu'):
        cs[nih_type] = float(sum(u[nih_type] for u in cs['usage']))

    return cs
Convert a cluster to a full summary for use in creating a report,
dataset/ETHPy150Open Yelp/mrjob/mrjob/tools/emr/audit_usage.py/_cluster_to_full_summary