def propagateParents(currentTerm, baseGOid, GOdict, parentSet):
    """
    Propagates through the parent hierarchy of a provided GO term to create a set of all higher order parents.

    Each term's recursive_parents attribute will be filled with all recursively found parent terms.

    Parameters
    ----------
    currentTerm : str
        The GO id that is being visited.
    baseGOid : str
        The original GO term id for which the search for its parents was started.
    GOdict : dict
        A dictionary of GO objects generated by importOBO().
        Keys are of the format `GO-0000001` and map to goTerm objects.
    parentSet : set
        An, initially, empty set that gets passed through the recursion.
        It tracks the entire recursive group of parent terms of the original base GO id (i.e. the starting point
        of the function call).

    Returns
    -------
    None
        Updates the parentSet set inplace so that it contains all the (recursive) parents for the baseGOid.
    """

    # If current term has no further parents the recursion will end and move back up the stack,
    # since there are no more parents left to iterate over (because looping through None does nothing).
    parents = GOdict.get(currentTerm).parents

    # For each parent of the current term under consideration
    for parent in parents:
        # Check if parent is present in GO dictionary
        # This is required because namespace filtering might lead to parent terms
        # that are no longer present as GOterm objects themselves.
        if parent in GOdict:
            # Add current term's parents to growing set
            parentSet.add(parent)
            # and recurse function for each parent
            propagateParents(parent, baseGOid, GOdict, parentSet)

        else:
            # Print a warning that a parent term was reported for the original base term,
            # yet the term is absent from the gene ontology file
            print('WARNING!\n' + parent, 'was defined as a parent for',
                  baseGOid, ', but was not found in the OBO file.\n')

    return None