The reducing API that removes a callback from the `events` object.
357377
function(events, name, callback, options) {
    if (!events) return;

    let i = 0,
        listening;
    let context = options.context,
        listeners = options.listeners;

    // Delete all events listeners and "drop" events.
    if (!name && !callback && !context) {
        let ids = Object.keys(listeners);
        for (; i < ids.length; i++) {
            listening = listeners[ids[i]];
            delete listeners[listening.id];
            delete listening.listeningTo[listening.objID];
        }
        return;
    }

    let names = name ? [name] : Object.keys(events);
    for (; i < names.length; i++) {
        name = names[i];
        let handlers = events[name];

        // Bail out if there are no events stored.
        if (!handlers) break;

        // Replace events if there are any remaining.  Otherwise, clean up.
        let remaining = [];
        for (let j = 0; j < handlers.length; j++) {
            let handler = handlers[j];
            if (
                (callback && callback !== handler.callback && callback !== handler.callback._callback) ||
                (context && context !== handler.context)
            ) {
                remaining.push(handler);
            } else {
                listening = handler.listening;
                if (listening && --listening.count === 0) {
                    delete listeners[listening.id];
                    delete listening.listeningTo[listening.objID];
                }
            }
        }

        // Update tail event if the list has any events.  Otherwise, clean up.
        if (remaining.length) {
            events[name] = remaining;
        } else {
            delete events[name];
        }
    }
    return events;
}
702468
function() {
		var i = 0;
		while (i<_callbacks.length) {
			var deps = _callbacks[i][0],
				func = _callbacks[i][1],
				n = 0;
			while (n<deps.length) {
				if (areDeepDepsDefined(deps[n])) {
					deps.splice(n, 1);
				}
				else {
					n++;
				}
			}
			if (!deps.length) {
				_callbacks.splice(i, 1);
				if (func != null) {
					setTimeout(func, 0);
				}
			}
			else {
				i++;
			}
		}
	}
912445
function() {
        if (!this._callbacks) return;
        this.__callbacksFrozen = false;
        for (var event in this._callbacks) {
            if (this._callbacks[event]) {
                // Remove the normal way, in case we've got a nested loop
                this._unbindCallbacks(event);
                // Also completely delete the registered callback from handlers
                delete handlers[event][this[0]];
            }
        }
    }
1365259
function removeEventListener(el, eventName, handler) {
    if (window.jQuery) {
      $(el).off(eventName, handler);
    } else if (el.removeEventListener) {
      el.removeEventListener(eventName, handler);
    } else {
      el.detachEvent('on' + eventName, handler);
    }
  }
1159611
def unlisten(self, event, callback):
        
        try:
            self.listeners[event].remove(callback)
        except ValueError:
            return False
        else:
            return True
161938
function removeCallbacks(src, callback, context) {
    return filter(src, function(event) {
      return (!callback || event[0] == callback) && (!context || context == event[1]);
    });
  }
305220
def remove_all_listeners(self, event=None):
        
        if event is not None:
            self._events[event] = OrderedDict()
        else:
            self._events = defaultdict(OrderedDict)
591444
function (eventType, callback, scope) {
                if (!eventType) {
                    // remove all events
                    this._eventHandlers = {};
                } else if (!callback) {
                    // remove all callbacks for these event
                    this._eventHandlers[eventType] = [];
                } else if (this._eventHandlers[eventType]) {
                    var list = this._eventHandlers[eventType];
                    for (var i = list.length - 1; i >= 0; i--) {
                        if (list[i].$callback == callback && (!scope || scope === list[i].scope)) {
                            list.splice(i, 1);  // delete callback
                        }
                    }
                }
            }
465909
function _off (event, method, context) {
  /* eslint-disable no-invalid-this */
  if (arguments.length === 0) {
    if (DEBUG) {
      forEach(this.__events__, (bindings) => {
        bindings.forEach((b) => {
          console.info('_off()', b.method.name, b.context, this)
        })
        count -= bindings.length
      })
      console.info(COUNT_MSG, count)
    }
    this.___events___ = {}
    return this
  }
  if (arguments.length === 1) {
    // Remove all bindings for event
    if (DEBUG) {
      count -= (this.__events__[event] || []).length
      console.info(COUNT_MSG, count)
    }
    delete this.__events__[event]
    return this
  }
  validateMethod(method, context)
  if (!(event in this.__events__) || !this.__events__[event].length) {
    if (DEBUG) console.info('NO MATCHING BINDINGS')
    // No matching bindings
    return this
  }
  // Default to null context
  if (arguments.length < 3) {
    context = null
  }
  // Remove matching handlers
  let bindings = this.__events__[event]
  for (let i = bindings.length - 1; i >= 0; i--) {
    const b = bindings[i]
    if (b.method === method && b.context === context) {
      bindings.splice(i, 1)
      if (DEBUG) count--
    }
  }
  // Cleanup if now empty
  if (bindings.length === 0) {
    delete this.__events__[event]
  }
  if (DEBUG) console.info(COUNT_MSG, count)
  return this
  /* eslint-enable no-invalid-this */
}
272464
function offEvent(gesture, handler) {
    var gestures = gesture.split(' ');
    Hammer.utils.each(gestures, function(gesture) {
      this.element.removeEventListener(gesture, handler, false);
    }, this);
    return this;
  }
819259
function (implementOn, event, callback) {
	var stringy = callback.toString();

	if (this._cached[stringy]) {

		// Iteratre through the cached callbacks and remove the correct one based on reference
		for(var i=0,numCbs=this._cached[stringy].length; i < numCbs; i++) {
			if (this._cached[stringy][i].raw === callback) {
				implementOn.removeEventListener(event, this._cached[stringy][i].fn);
			}
		}
	}
}
972177
function(el, e, callback, capture)
    {
        if (hasEventListeners) {
            el.removeEventListener(e, callback, !!capture);
        } else {
            el.detachEvent('on' + e, callback);
        }
    }
532463
function unbindEvents(target, events, listener) {
    events.split(' ').forEach(function (event) {
        return target.removeEventListener(event, listener, false);
    });
}
582119
function(name, callback, context) {
    if (eventsApi(this, 'stopReplying', name)) {
      return this;
    }

    // Remove everything if there are no arguments passed
    if (!name && !callback && !context) {
      delete this._requests;
    } else if (!removeHandlers(this._requests, name, callback, context)) {
      Radio.debugLog('Attempted to remove the unregistered request', name, this.channelName);
    }

    return this;
  }
388195
def remove_listener(self, callback):
        
        listeners = filter(lambda x: x['callback'] == callback, self.listeners)
        for l in listeners:
            self.listeners.remove(l)
774077
function(events, name, callback, context) {
  // Remove all callbacks for all events.
  if (!events || !name && !context && !callback) return;

  var names = name ? [name] : _.keys(events);
  for (var i = 0, length = names.length; i < length; i++) {
    name = names[i];
    var handlers = events[name];

    // Bail out if there are no events stored.
    if (!handlers) break;

    // Find any remaining events.
    var remaining = [];
    if (callback || context) {
      for (var j = 0, k = handlers.length; j < k; j++) {
        var handler = handlers[j];
        if (
          callback && callback !== handler.callback &&
            callback !== handler.callback._callback ||
              context && context !== handler.context
        ) {
          remaining.push(handler);
        }
      }
    }

    // Replace events if there are any remaining.  Otherwise, clean up.
    if (remaining.length) {
      events[name] = remaining;
    } else {
      delete events[name];
    }
  }
  if (!_.isEmpty(events)) return events;
}
695567
def _remove_session_callback(self, callback_obj, originator):
        ''' 

        '''
        try:
            callback_objs = [callback_obj]
            self._session_callbacks.remove(callback_obj)
            for cb, cb_objs in list(self._callback_objs_by_callable[originator].items()):
                try:
                    cb_objs.remove(callback_obj)
                    if not cb_objs:
                        del self._callback_objs_by_callable[originator][cb]
                except KeyError:
                    pass
        except KeyError:
            raise ValueError("callback already ran or was already removed, cannot be removed again")
        # emit event so the session is notified and can remove the callback
        for callback_obj in callback_objs:
            self._trigger_on_change(SessionCallbackRemoved(self, callback_obj))