Unsubscribes the subscriber from push.
The broadcast value is null (not used in the AMP page).
357462
function onMessageReceivedUnsubscribe() {
    self.registration.pushManager.getSubscription()
        .then(subscription => subscription.unsubscribe())
        .then(() => {
            clearLocalDatabase();
            // OPTIONALLY IMPLEMENT: Forward the unsubscription to your server here
            broadcastReply(WorkerMessengerCommand.AMP_UNSUBSCRIBE, null);
        });
}
40303
def endSubscription(self, subscriber):
        
        self._reqId2Contract.pop(subscriber.reqId, None)
        self.reqId2Subscriber.pop(subscriber.reqId, None)
393250
public <T extends DObject> void unsubscribeFromObject (int oid, Subscriber<T> target)
    {
        // queue up an access object event
        postEvent(new AccessObjectEvent<T>(oid, target, AccessObjectEvent.UNSUBSCRIBE));
    }
1270055
public static <E extends Event> void unsubscribe(Class<E> event, final Listener<E> listener) {
        getEventBus().unsubscribe(event, listener);
    }
1329612
def unsubscribe(self, channel_name):
        
        if channel_name in self.channels:
            self.connection.send_event(
                'pusher:unsubscribe', {
                    'channel': channel_name,
                }
            )
            del self.channels[channel_name]
17721
public void unsubscribe(Class<? extends Subscriber> subscriberType) {
        for (ArrayList<Class<? extends Subscriber>> list : subscriptionMap.values()) {
            list.remove(subscriberType);
        }
    }
1308374
def unsubscribe(self):
        
        # Trying to unsubscribe if already unsubscribed, or not yet
        # subscribed, fails silently
        if self._has_been_unsubscribed or not self.is_subscribed:
            return

        # Cancel any auto renew
        self._auto_renew_thread_flag.set()
        # Send an unsubscribe request like this:
        # UNSUBSCRIBE publisher path HTTP/1.1
        # HOST: publisher host:publisher port
        # SID: uuid:subscription UUID
        headers = {
            'SID': self.sid
        }
        response = None
        try:
            response = requests.request(
                'UNSUBSCRIBE',
                self.service.base_url + self.service.event_subscription_url,
                headers=headers,
                timeout=3)
        except requests.exceptions.RequestException:
            pass

        self.is_subscribed = False
        self._timestamp = None
        log.info(
            "Unsubscribed from %s, sid: %s",
            self.service.base_url + self.service.event_subscription_url,
            self.sid)
        # remove queue from event queues and sid to service mappings

        with _subscriptions_lock:
            try:
                del _subscriptions[self.sid]
            except KeyError:
                pass
        self._has_been_unsubscribed = True

        # Ignore "412 Client Error: Precondition Failed for url:"
        # from rebooted speakers.
        if response and response.status_code != 412:
            response.raise_for_status()
234484
function unsubscribe(event, callback) {
	/*jshint validthis: true */
	if (DEBUG_DISPATCHER) log.info('UNSUBSCRIBE: ' + event);
	if (!event || !callback) {
		return;
	}
	var callbacks = this._callbacks[event];
	if (callbacks) {
		for (var i = callbacks.length - 1; i >= 0; i--) {
			if (callbacks[i] === callback) {
				callbacks.splice(i, 1);
			}
		}
	}

	if (!callbacks || callbacks.length === 0) {
		this._client.unsubscribe(event);
	}

	return this;
}
1320757
def unsubscribe(self, *args):
        
        if args:
            args = list_or_args(args[0], args[1:])
            channels = self._normalize_keys(dict.fromkeys(args))
        else:
            channels = self.channels
        self.pending_unsubscribe_channels.update(channels)
        return self.execute_command('UNSUBSCRIBE', *args)
360386
def unsubscribe(self, request, *args, **kwargs):
        
        self.object = self.get_object()
        self.object.subscribers.remove(request.user)
        messages.success(self.request, self.success_message)
        return HttpResponseRedirect(self.get_success_url())
980694
public void unsubscribe(final Subscription subscription) {
        for (final ArrayList<Subscription> list : SUBSCRIPTION_MAP.values()) {
            list.remove(subscription);
        }
    }
923302
def unsubscribe(self, message, handler):
        '''
        
        '''
        with self._lock:
            self._subscribers[message].remove(WeakCallable(handler))
667598
def unsubscribe_from_hub(self, event, callback):
        
        return self._hub("unsubscribe", event, callback, github.GithubObject.NotSet)
237577
function unsubscribe(topicArn) {

        // if not subscribed then return now
        if (!subscriptions[topicArn]) {
            debug('Not subscribed to ' + topicArn);
            return Promise.resolve();
        }

        return new Promise(function(resolve, reject) {
            const params = { SubscriptionArn: topicArn };
            config.sns.unsubscribe(params, function (err) {
                debug('Unsubscribe from ' + topicArn + (err ? ' failed: ' + err.message : 'succeeded'));
                if (err) return reject(err);
                delete subscriptions[topicArn];
                resolve();
            });
        });
    }
1263275
@SuppressWarnings("unlikely-arg-type")
    public boolean unsubscribe(IConsumer consumer) {
        if (consumers.remove(consumer)) {
            fireConsumerConnectionEvent(consumer, PipeConnectionEvent.EventType.CONSUMER_DISCONNECT, null);
            listeners.remove(consumer);
            return true;
        }
        return false;
    }
377598
def unsubscribe_from_data(
        self,
        subscriber: Callable[[bytes], bool],
    ) -> None:
        
        self._data_subscribers.remove(subscriber)
37940
function unsubscribe(message) {
		reply(proto.writeUnsubscribe(message.id));
		subscritions[message.itemName] = undefined;
		dequeueSubUnsubRequest(message.itemName);
		handleLateSubUnsubRequests(message.itemName);
		fireFirstSubUnsubEvent(message.itemName);
	}