'Insert a new child at pos.
If pos is a Parameter, then insert at the position of that Parameter.
If child is a dict, then a parameter is constructed using
:func:`Parameter.create <pyqtgraph.parametertree.Parameter.create>`.
By default, the child\'s \'autoIncrementName\' option determines whether
the name will be adjusted to avoid prior name collisions. This
behavior may be overridden by specifying the *autoIncrementName*
argument. This argument was added in version 0.9.9.'

def insertChild(self, pos, child, autoIncrementName=None):

    if isinstance(child, dict):
        child = Parameter.create(**child)
    name = child.name()
    if ((name in self.names) and (child is not self.names[name])):
        if ((autoIncrementName is True) or ((autoIncrementName is None) and child.opts.get('autoIncrementName', False))):
            name = self.incrementName(name)
            child.setName(name)
        else:
            raise Exception(('Already    have    child    named    %s' % str(name)))
    if isinstance(pos, Parameter):
        pos = self.childs.index(pos)
    with self.treeChangeBlocker():
        if (child.parent() is not None):
            child.remove()
        self.names[name] = child
        self.childs.insert(pos, child)
        child.parentChanged(self)
        self.sigChildAdded.emit(self, child, pos)
        child.sigTreeStateChanged.connect(self.treeStateChanged)
    return child
