code: def insert(self, index, *parts):
          
          if not all(isinstance(p, RectPartition) for p in parts):
              raise TypeError('`parts` must all be `RectPartition` instances, '
                              'got ({})'
                              ''.format(', '.join(repr(p) for p in parts)))
  
          newgrid = self.grid.insert(index, *(p.grid for p in parts))
          newset = self.set.insert(index, *(p.set for p in parts))
          return RectPartition(newset, newgrid)
docs: Return a copy with ``parts`` inserted before ``index``.
  
          The given partitions are inserted (as a block) into ``self``,
          yielding a new partition whose number of dimensions is the sum of
          the numbers of dimensions of all involved partitions.
          Note that no changes are made in-place.
  
          Parameters
          ----------
          index : int
              Index of the dimension before which ``other`` is to
              be inserted. Negative indices count backwards from
              ``self.ndim``.
          part1, ..., partN : `RectPartition`
              Partitions to be inserted into ``self``.
  
          Returns
          -------
          newpart : `RectPartition`
              The enlarged partition.
  
          Examples
          --------
          >>> part1 = odl.uniform_partition([0, -1], [1, 2], (3, 3))
          >>> part2 = odl.uniform_partition(0, 1, 5)
          >>> part1.insert(1, part2)
          uniform_partition([ 0.,  0., -1.], [ 1.,  1.,  2.], (3, 5, 3))
  
          See Also
          --------
          append