def METHOD_NAME(bundles, prefix):
    """
    Consolidates values of multiple outputs into one array for the new
    output.
    """
    res = {}
    outputs = [output for bundle in bundles for output in bundle.outputs]
    for output in outputs:
        output_name = output['name']
        new_name = prefix + output_name[0].upper() + output_name[1:] + 's'
        if not new_name in res:
            res[new_name] = {'name': new_name, 'value': []}
        res[new_name]['value'].append(output['value'])
    # We sort the output by key to guarantee deterministic results. This makes
    # DM's Python3 compatibility checker less grumpy.
    return [value for _, value in sorted(res.items())]