'The index of this tree in its parent.  I.e.,
``ptree.parent()[ptree.parent_index()] is ptree``.  Note that
``ptree.parent_index()`` is not necessarily equal to
``ptree.parent.index(ptree)``, since the ``index()`` method
returns the first child that is equal to its argument.'

def parent_index(self):

    if (self._parent is None):
        return None
    for (i, child) in enumerate(self._parent):
        if (child is self):
            return i
    assert False, u'expected    to    find    self    in    self._parent!'
