def update(self, img, value_dict):
        img = self.get(img)
        uri = "/%s/%s" % (self.uri_base, utils.get_id(img))
        body = []
        for key, val in value_dict.items():
            op = "replace" if key in img.__dict__ else "add"
            body.append({"op": op,
                    "path": "/%s" % key,
                    "value": val})
        headers = {"Content-Type":
                "application/openstack-images-v2.1-json-patch"}
        resp, resp_body = self.api.method_patch(uri, body=body, headers=headers)
Translates the given ``dict`` into an instance of this class.
dataset/ETHPy150Open rackspace/pyrax/pyrax/image.py/ImageManager.update--crossover with--dataset/ETHPy150Open openstack/taskflow/taskflow/persistence/models.py/AtomDetail.from_dict