<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ref2names2commdct(ref2names, commdct):
 """embed ref2names into commdct"""

    for comm in commdct:
        for cdct in comm:
            try:
                refs = cdct['object-list'][0]
                validobjects = ref2names[refs]
                cdct.update({'validobjects':validobjects})
            except KeyError as e:
                continue
    return commdct