docs: def grp_by_src(self):
          """
          :returns: a new CompositeSourceModel with one group per source
          """
          smodels = []
          grp_id = 0
          for sm in self.source_models:
              src_groups = []
              smodel = sm.__class__(sm.names, sm.weight, sm.path, src_groups,
                                    sm.num_gsim_paths, sm.ordinal, sm.samples)
              for sg in sm.src_groups:
                  for src in sg.sources:
                      src.src_group_id = grp_id
                      src_groups.append(
                          sourceconverter.SourceGroup(
                              sg.trt, [src], name=src.source_id, id=grp_id))
                      grp_id += 1
              smodels.append(smodel)
          return self.__class__(self.gsim_lt, self.source_model_lt, smodels,
                                self.optimize_same_id)