code: def childgroup(self, field):
          
          grid = getattr(self, "grid", None)
          named_grid = getattr(self, "named_grid", None)
  
          if grid is not None:
              childgroup = self._childgroup(field.children, grid)
          elif named_grid is not None:
              childgroup = self._childgroup_by_name(field.children, named_grid)
          else:
              raise AttributeError(u"Missing the grid or named_grid argument")
  
          return childgroup
docs: Return a list of fields stored by row regarding the configured grid
  
          :param field: The original field this widget is attached to