'Write a block of metadata to an object.'

def write_metadata(self, metadata):

    (data, cur_mdata) = self._filesystem.get_object(self._name)
    if (data is not None):
        immutable_metadata = dict([(key, val) for (key, val) in cur_mdata.items() if ((key.lower() in DATAFILE_SYSTEM_META) or is_sys_meta('object', key))])
        metadata.update(immutable_metadata)
        metadata['name'] = self._name
        self._filesystem.put_object(self._name, data, metadata)
