<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_content_by_id(self, content_data, content_id, callback=None):
 """ Updates a piece of Content, or restores if it is trashed. The body contains the representation of the content. Must include the new version number. To restore a piece of content that has the status of trashed the content must have it's version incremented, and status set to current. No other field modifications will be performed when restoring a piece of content from the trash. Request example to restore from trash: { "id": "557059", "status": "current", "version": { "number": 2 } } :param content_data (dict):
 The content data (with desired updates). This should be retrieved via the API call to get content data, then modified to desired state. Required keys are: "id", "type", "title", "space", "version", and "body". :param content_id (string):
 The id of the content to update. :param callback: OPTIONAL: The callback to execute on the resulting data, before the method returns. Default: None (no callback, raw data returned). :return: The JSON data returned from the content/{id} endpoint, or the results of the callback. Will raise requests.HTTPError on bad input, potentially. Example content data: { "id": "3604482", "type": "page", "title": "Example Content title", "space": { "key": "TST" }, "version": { "number": 2, "minorEdit": false }, "body": { "storage": { "value": "<p>This is the updated text for the new page</p>", "representation": "storage" } } } """

        assert isinstance(content_data, dict) and set(content_data.keys()) >= self.UPDATE_CONTENT_REQUIRED_KEYS
        return self._service_put_request("rest/api/content/{id}".format(id=content_id), data=json.dumps(content_data),
                                         headers={"Content-Type": "application/json"}, callback=callback)