<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _process_docgroup(self, group, code_el, add=True):
 """Explodes the group members into a list; adds the group to the specified code element and updates the group value for each of the docstring elements in the group. :arg add: when true, docgroups must be unique in the code element; otherwise, existing groups are overwritten."""

        if group.name in code_el.groups and add:
            msg.warn("duplicate group names in code element {}".format(code_el.name))
        else:
            code_el.groups[group.name] = group

        kids = self.to_doc(list(group.xml), group.decorates)
        for child in kids:
            child.group = group.name

        return kids