<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_space(self, space_key, space_definition, callback=None):
 """ Updates a Space. Currently only the Space name, description and homepage can be updated. :param space_key (string):
 The key of the space to update. :param space_definition (dict):
 The dictionary describing the updated space metadata. This should include "key", "name" and "description". :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 space/{key} endpoint, or the results of the callback. Will raise requests.HTTPError on bad input, potentially. Example updated space definition: { "key": "TST", "name": "Example space", "description": { "plain": { "value": "This is an example space", "representation": "plain" } } } """

        assert isinstance(space_definition, dict) and {"key", "name", "description"} <= set(space_definition.keys())
        return self._service_put_request("rest/api/space/{key}".format(key=space_key),
                                         data=json.dumps(space_definition),
                                         headers={"Content-Type": "application/json"}, callback=callback)