'Extracts metadata from existing URI into a dict, so we can
overwrite/delete from it to form the new set of metadata to apply to a
key.'

def _get_remote_metadata(self, headers=None):

    metadata = {}
    for underscore_name in self._underscore_base_user_settable_fields:
        if hasattr(self, underscore_name):
            value = getattr(self, underscore_name)
            if value:
                field_name = underscore_name.replace('_', '-')
                metadata[field_name.lower()] = value
    prefix = self.provider.metadata_prefix
    for underscore_name in self.metadata:
        field_name = underscore_name.replace('_', '-')
        metadata[('%s%s' % (prefix, field_name.lower()))] = self.metadata[underscore_name]
    return metadata
