Store the repr() of the return value of func in stampfile.

def _stamp(stampfile, func, *args, **kwargs):
    """Store the repr() of the return value of func in stampfile."""
    value = func(*args, **kwargs)
    with open(stampfile, "wb") as stamp:
        stamp.truncate()
        pickle.dump(value, stamp)

    return value