code: def makebunches_alter(data, commdct, theidf):
      
      bunchdt = {}
      dt, dtls = data.dt, data.dtls
      for obj_i, key in enumerate(dtls):
          key = key.upper()
          objs = dt[key]
          list1 = []
          for obj in objs:
              bobj = makeabunch(commdct, obj, obj_i)
              list1.append(bobj)
          bunchdt[key] = Idf_MSequence(list1, objs, theidf)
      return bunchdt
docs: make bunches with data