def get_custom_fields_supertypes(custom_fields):
    """
    Returns a list of fields with their aggregate things.
    E.g., [{
        "id": "ga:metric1",
        "kind": "analytics#customMetric",
        "dataTypes": ["string", "currency", ...],
        "type": "METRIC",
        "group": "Custom Fields"
    }, ...]
    """
    super_fields = {}
    for fields in custom_fields.values():
        for field in fields:
            super_field = super_fields.get(field['id'], {'id': field['id'],
                'kind': field.get('kind'), 'dataTypes': set(), 'type':
                field['type'], 'group': field['group']})
            super_field['dataTypes'].add(field['dataType'])
            super_fields[field['id']] = super_field
    return list(super_fields.values())
