''

@classmethod
def create(cls, events, **metadata):

    header = cls.create_header()
    if (not events):
        raise ValueError('PATCH-DOC    message    requires    at    least    one    event')
    document = events[0].document
    patch_json = document.create_json_patch_string(events)
    content = loads(patch_json)
    msg = cls(header, metadata, content)
    return msg
