'Set the metadata. Update only the domains that are contained in the
value dictionary.'

@metadata.setter
def metadata(self, value):

    for (domain, metadata) in value.items():
        domain = (None if (domain == 'DEFAULT') else domain.encode())
        for (meta_name, meta_value) in metadata.items():
            capi.set_ds_metadata_item(self._ptr, meta_name.encode(), (meta_value.encode() if meta_value else None), domain)
