def METHOD_NAME(a, b, limit=7):
    """ this function is also used by lfunctions/LfunctionPlot.py """
    headers = list(range(1, limit))
    headers.append("more")
    entries = {}
    rows = list(range(a, b + 1))
    for row in rows:
        if row != 1:
            G = Integers(row).list_of_elements_of_multiplicative_group()
        else:
            G = [1]
        for chi_n in G:
            chi = ConreyCharacter(row, chi_n)
            multorder = chi.order
            if multorder <= limit:
                el = chi
                col = multorder
                entry = entries.get((row, col), [])
                entry.append(el)
                entries[(row, col)] = entry
    entries2 = {}
    def out(chi): return (chi.number, chi.is_primitive,
                       chi.order, chi.is_even())
    for k, v in entries.items():
        l = []
        v = sorted(v, key=lambda x: x.number)
        while v:
            e1 = v.pop(0)
            e1_num = e1.number
            inv_num = 1 if e1_num == 1 else e1_num.inverse_mod(e1.modulus)
            inv = ConreyCharacter(e1.modulus, inv_num)
            if e1_num == inv_num:
                l.append((out(e1),))
            else:
                l.append((out(e1), out(inv)))
                v = [x for x in v if (x.modulus, x.number) != (inv.modulus, inv.number)]
        if k[1] == "more":
            l = sorted(l, key=lambda e: e[0][2])
        entries2[k] = l
    cols = headers
    return headers, entries2, rows, cols