def METHOD_NAME(
    cls,
    group_definition: GroupDefinition,
    add_unit_func: Optional[AddUnitFunc] = None,
) -> Group:
    grp = cls(group_definition.name)
    add_unit_func = add_unit_func or grp._REGISTRY._add_unit
    # We first add all units defined within the group
    # to the registry.
    for definition in group_definition.definitions:
        add_unit_func(definition)
    # Then we add all units defined within the group
    # to this group (by name)
    grp.add_units(*group_definition.unit_names)
    # Finally, we add all grou0ps used by this group
    # tho this group (by name)
    if group_definition.using_group_names:
        grp.add_groups(*group_definition.using_group_names)
    return grp