nltk.ImmutableMultiParentedTree.parent_indices

ImmutableMultiParentedTree.parent_indices(parent)

Return a list of the indices where this tree occurs as a child of parent. If this child does not occur as a child of parent, then the empty list is returned. The following is always true:

for parent_index in ptree.parent_indices(parent):
    parent[parent_index] is ptree