Index of the child in the relation.

def index(self, child_pid):
        """Index of the child in the relation."""
        if not isinstance(child_pid, PersistentIdentifier):
            child_pid = resolve_pid(child_pid)
        relation = PIDRelation.query.filter_by(
            parent=self._resolved_pid,
            child=child_pid,
            relation_type=self.relation_type.id).one()
        return relation.index