docs: function (callbacksMap, name, scope, fn, src, firstOnly) {
          if (callbacksMap == null) {
              return; // nothing to remove
          }
  
          var arr = callbacksMap[name];
  
          if (arr) {
              var length = arr.length, removeThis = false, cb;
              for (var i = 0; i < length; i++) {
                  cb = arr[i];
  
                  // determine if callback should be removed, start with
                  // removeThis = true and then set to false if
                  // conditions are not met
  
                  // check the interface from which we remove the listener
                  removeThis = (!src || cb.src == src)
                          // scope does not match
                          && (!scope || scope == cb.scope)
                          // fn does not match
                          && (!fn || fn == cb.fn);
  
                  if (removeThis) {
                      // mark the callback as being removed, so that it can either
                      // still be called (in case of CallEnd in
                      // interceptors, if CallBegin has been called) or not called
                      // at all (in other cases)
                      cb.removed = true;
                      arr.splice(i, 1);
                      if (firstOnly) {
                          break;
                      } else {
                          i--;
                          length--;
                      }
                  }
              }
              if (arr.length === 0) {
                  // no listener anymore for this event/interface
                  callbacksMap[name] = null;
                  delete callbacksMap[name];
              }
          }
      }