<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def authorize(self, email, permission_type='read', cloud=None, api_key=None, version=None, **kwargs):
 """ This API endpoint allows you to authorize another user to access your model in a read or write capacity. Before calling authorize, you must first make sure your model has been registered. Inputs: email - String: The email of the user you would like to share access with. permission_type (optional) - String: One of ['read', 'write']. Users with read permissions can only call `predict`. Users with `write` permissions can add new input examples and train models. api_key (optional) - String: Your API key, required only if the key has not been declared elsewhere. This allows the API to recognize a request as yours and automatically route it to the appropriate destination. cloud (optional) - String: Your private cloud domain, required only if the key has not been declared elsewhere. This allows the API to recognize a request as yours and automatically route it to the appropriate destination. """

        kwargs['permission_type'] = permission_type
        kwargs['email'] = email
        url_params = {"batch": False, "api_key": api_key, "version": version, "method": "authorize"}
        return self._api_handler(None, cloud=cloud, api="custom", url_params=url_params, **kwargs)