def _get_most_recently_used(last_used):
    last_used = {k: v for k, v in last_used.iteritems() if v != NOT_FOUND}
    most_recently_used = sorted(last_used, key=last_used.get, reverse=True)
    return {
        'name': most_recently_used[0],
        'date': last_used[most_recently_used[0]]
    } if most_recently_used else None
Returns the name and date of the most recently used toggle
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/toggle_ui/views.py/_get_most_recently_used