Provide a list of nexted CWL records keyed by output key.

    Handles batches, where we return a list of records, and single items
    where we return one record.

def _combine_cwl_records(recs, record_name, parallel):
    """Provide a list of nexted CWL records keyed by output key.

    Handles batches, where we return a list of records, and single items
    where we return one record.
    """
    if parallel not in ["multi-batch", "single-split", "multi-combined", "batch-single"]:
        assert len(recs) == 1, pprint.pformat(recs)
        return {record_name: recs[0]}
    else:
        return {record_name: recs}