docs: def accordions(self, form):
          """
          return the chlidren of the given form in a dict allowing to render them
          in accordions with a grid layout
          :param form: the form object
          """
          fixed = []
          accordions = OrderedDict()
  
          for child in form.children:
              section = getattr(child.schema, 'section', '')
              if not section:
                  fixed.append(child)
              else:
                  if section not in accordions.keys():
                      accordions[section] = {
                          'tag_id': random_tag_id(),
                          'children': [],
                          'name': section,
                          "error": False,
                      }
                  if child.error:
                      accordions[section]['error'] = True
                  accordions[section]['children'].append(child)
  
          grids = getattr(self, "grids", {})
          named_grids = getattr(self, 'named_grids', {})
  
          if grids != {}:
              method = self._childgroup
          elif named_grids != {}:
              method = self._childgroup_by_name
              grids = named_grids
          else:
              warnings.warn(u"Missing both grids and named_grids argument")
  
          for accordion in accordions.values():
              name = accordion['name']
              grid = grids.get(name)
              if grid is not None:
                  children = accordion.pop('children')
                  accordion['rows'] = method(children, grid)
  
          return fixed, accordions