def merge_subcon(parent, subattr):
    """Merge a subcon's fields into its parent.

    parent: the Container into which subattr's fields should be merged
    subattr: the name of the subconstruct
    """
    subcon = getattr(parent, subattr, None)
    if not subcon:
        return
    for a in subcon:
        setattr(parent, a, getattr(subcon, a))
    delattr(parent, subattr)
