'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'

def parent_indices(self, parent):

    if (parent not in self._parents):
        return []
    else:
        return [index for (index, child) in enumerate(parent) if (child is self)]
