code: 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;
  }
docs: The reducing API that removes a callback from the `events` object.