def METHOD_NAME(self, pos, parent_idx, child_idx):
    if self._next_node >= self._resize_limit:
        self._resize_nodes()
    parent = self._nodes[parent_idx]
    new_idx = self._next_node
    self._next_node += 1
    delta = self._size/(2**(parent['depth'] + 2))
    new_node = self._nodes[new_idx]
    new_node['nPoints'] = 1
    new_node['centre'] = parent['centre'] + self._octant_sign[child_idx]*delta
    new_node['centroid'] = pos
    new_node['depth'] = parent['depth'] + 1
    new_node['parent'] = parent_idx
    if not parent['children'][child_idx] == 0:
        raise RuntimeError('Child already allocated: parent_idx=%d, child_idx=%d, pos = %s' % (parent_idx, child_idx, pos))
    parent['children'][child_idx] = new_idx
    return new_idx, new_node