def render_addressbook(result):
    lines = []
    for entry in sorted(result["addressbook"], key=lambda e: e["petname"]):
        lines.append('"%s" (%s):' % (entry["petname"], entry["cid"]))
        lines.append(" %s" % {False: "not acknowledged",
                              True: "acknowledged"}[entry["acked"]])
        if entry.has_key("their_verfkey"):
            lines.append(" their verfkey: %s" % entry["their_verfkey"])
        lines.append(" (our verfkey): %s" % entry["my_verfkey"])
    return "\n".join(lines)+"\n"
dataset/ETHPy150Open warner/petmail/petmail/scripts/runner.py/render_addressbook/original