def get_predecessor(plan_dict, subplan_id):
    """Acquire the name of the predecessor (parent) of a given subplan.

    The plan tree is a true tree. All subplans have exactly one
    predecessor/parent. Use this function to walk 'up' the tree.

    Args
        plan_dict:      The plan dictionary as returned by load_plan().
        subplan_id:     The name of the target subplan.

    Returns
        The name of the parent subplan is returned. If the root plan name
        is specified None is returned.
    """

    segments = subplan_id.split(sep='.')
    if len(segments) <= 1:
        subplan_id = None
    else:
        segments.pop()
        subplan_id = '.'.join(segments)
    return subplan_id