docs: def _convert(tup, dictlist):
      """
      :param tup: a list of tuples
      :param di: a dictionary converted from tup
      :return: dictionary
      """
      di = {}
      for a, b in tup:
          di.setdefault(a, []).append(b)
      for key, val in di.items():
          dictlist.append((key, val))
      return dictlist