code: def _childgroup(self, children, grid):
          
          result = []
          index = 0
          hidden_fields = []
  
          for row in grid:
              child_row = []
              width_sum = 0
              for width, filled in row:
                  width_sum += width
                  if width_sum > self.num_cols:
                      warnings.warn(u"It seems your grid configuration overlaps \
  the bootstrap layout columns number. One of your lines is larger than {0}. \
  You can increase this column number by compiling bootstrap css with \
  lessc.".format(self.num_cols))
  
                  if isinstance(filled, StaticWidget):
                      child = filled
                      child.width = width
  
                  elif filled:
                      try:
                          child = children[index]
                      except IndexError:
                          warnings.warn(u"The grid items number doesn't \
  match the number of children of our mapping widget")
                          break
                      if type(child.widget) == deform.widget.HiddenWidget:
                          hidden_fields.append(child)
                          index += 1
                          try:
                              child = children[index]
                          except IndexError:
                              warnings.warn(u"The grid items number doesn't \
  match the number of children of our mapping widget")
                              break
                      child.width = width
                      index += 1
                  else:
                      child = VoidWidget(width)
                  child_row.append(child)
              if child_row != []:
                  result.append(child_row)
  
          if index <= len(children):
              result.append(children[index:])
  
          if hidden_fields != []:
              result.append(hidden_fields)
          return result
docs: Stores the children in a list following the grid's structure
  
          :param children: list of fields
  
          :param grid: a list of list corresponding of the layout to apply to the
          given children