def setMetadata(self, item, metadata):
        if 'meta' not in item:
            item['meta'] = {}

        # Add new metadata to existing metadata
        item['meta'].update(six.viewitems(metadata))

        # Remove metadata fields that were set to null (use items in py3)
        toDelete = [k for k, v in six.viewitems(item['meta']) if v is None]
        for key in toDelete:
            del item['meta'][key]

        item['updated'] = datetime.datetime.utcnow()

        # Validate and save the item
        return self.save(item)
Return an updated token from a token request body.
dataset/ETHPy150Open girder/girder/girder/models/item.py/Item.setMetadata--crossover with--dataset/ETHPy150Open apache/libcloud/libcloud/common/google.py/GoogleBaseAuthConnection._token_request