'Create/index an extended metadata object. The returned object is
not associated with any items'

def create_extended_metadata(self, trans, extmeta):

    ex_meta = ExtendedMetadata(extmeta)
    trans.sa_session.add(ex_meta)
    trans.sa_session.flush()
    for (path, value) in self._scan_json_block(extmeta):
        meta_i = ExtendedMetadataIndex(ex_meta, path, value)
        trans.sa_session.add(meta_i)
    trans.sa_session.flush()
    return ex_meta
