def add_metadata(call_log_entry, duration=None):
    try:
        call_log_entry.duration = int(round(float(duration)))
        call_log_entry.save()
    except (__HOLE__, ValueError):
        pass
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/ivr/api.py/add_metadata