<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _collapse_to_cwl_record_single(data, want_attrs, input_files):
 """Convert a single sample into a CWL record. """

    out = {}
    for key in want_attrs:
        key_parts = key.split("__")
        out[key] = _to_cwl(tz.get_in(key_parts, data), input_files)
    return out