def write_mutations(writer, shard, uuid, value, tokens):
    m = Mutation(uuid)
    m.put(cf="e", cq="", val=value)
    writer.add_mutation(m)

    m = Mutation(shard)
    for tok in tokens:
        m.put(tok, cq=uuid, val="")
        if len(m.updates) > 1000:
            writer.add_mutation(m)
            m = Mutation(shard)

    if len(m.updates) > 0:
        writer.add_mutation(m)
dataset/ETHPy150Open accumulo/pyaccumulo/examples/intersecting_iterator/ingest.py/write_mutations/original