docs: def _flatten_models(tasklist):
          " Create 1d-array containing all disctinct models from ``tasklist``. "
          ans = gvar.BufferDict()
          for task, mlist in tasklist:
              if task != 'fit':
                  continue
              for m in mlist:
                  id_m = id(m)
                  if id_m not in ans:
                      ans[id_m] = m
          return ans.buf.tolist()