def METHOD_NAME(task):
    taskdesc = ''
    # pack "key: value" metadata
    for k in 'description project status'.split():
        taskdesc += '%s: %s\n' % (k, task[k])
    # pack annotations separated by ---
    for note in task["annotations"]:
        taskdesc += "\n---\n"
        taskdesc += note.description
    # add final sentinel to indicate how to separate if no notes
    taskdesc += "\n---\n"
    ret = launchExternalEditorValue(taskdesc)
    # unpack annotations separated by ---
    newnotes = ret.split("\n---\n")
    task["annotations"] = newnotes[1:]
    # unpack "key: value" metadata
    for line in newnotes[0].splitlines():
        k, v = line.split(': ', maxsplit=1)
        task[k] = v