def init_subscription(d: ApiDefinition):
    if (d.cancel_method is None):
        raise RuntimeError(f'Request does not support cancellation {d.request_method.__name__}')
    current_subscription = f'self.{subscription_member_name(d)}[{request_id(d, d.request_method)}]'
    return f'{current_subscription}= SubscriptionGenerator(self.__{d.cancel_method.__name__}, {GeneratorUtils.req_id_param_name(d.request_method)})'
def init_subscription(d: ApiDefinition):
    if (d.cancel_method is None):
        raise RuntimeError(f'Request does not support cancellation {d.request_method.__name__}')
    current_subscription = f'self.{subscription_member_name(d)}[{request_id(d, d.request_method)}]'
    return f'{current_subscription}= SubscriptionGenerator(self.__{d.cancel_method.__name__}, {GeneratorUtils.req_id_param_name(d.request_method)})'