code: def get_effective_rlzs(rlzs):
      
      effective = []
      for uid, group in groupby(rlzs, operator.attrgetter('uid')).items():
          rlz = group[0]
          if all(path == '@' for path in rlz.lt_uid):  # empty realization
              continue
          effective.append(
              Realization(rlz.value, sum(r.weight for r in group),
                          rlz.lt_path, rlz.ordinal, rlz.lt_uid))
      return effective
docs: Group together realizations with the same unique identifier (uid)
      and yield the first representative of each group.