docs: function initMethod(method, id) {
  
      function getNamespace(type) {
        return type.split('.').reduce(function(ns, name) {
          if (!ns[name]) {
            // Create missing namespaces.
            ns[name] = {};
          }
          return ns[name];
        }, global);
      }
  
      function canNotify(self, args) {
        var wasNotified = method.message in encountered, check;
        check = (!method.suppressed) &&
                (!optionUnique() || !wasNotified) &&
                (!method.check || method.check.apply(self, args));
        if (check) {
          encountered[method.message] = true;
        }
        return check;
      }
  
      function wrapMethod(target, name) {
        var fn = target[name];
        function withSugarNotification() {
          var message = method.message, result;
  
          function exec(self, args) {
            if (!fn) {
              var targetName = method.type + (self === target ? '' : '.prototype');
              throw new Error(['Method', name, 'does not exist on', targetName].join(' '));
            }
            return fn.apply(self, args);
          }
  
          if (method.call) {
            message = message.replace(/%.+%/g, method.call.apply(this, arguments));
          }
  
          if (!isNotifying && canNotify(this, arguments, id)) {
            // Preventing nested notifications means that we don't have to
            // worry about detecting Sugar in the call stack as any call other
            // than the main entry point must be Sugar calling itself.
            if (fn && fn.name !== 'withSugarNotification') {
              // Prevent internal Sugar calls from triggering notifications,
              // but only if methods are not multi-wrapped.
              isNotifying = true;
            }
            notify(message, method);
            result = exec(this, arguments);
            isNotifying = false;
            return result;
          }
          return exec(this, arguments);
        }
        if (method.check === 'missing') {
          if (fn) {
            method.check = function() {
              return false;
            };
          } else {
            delete method.check;
          }
        }
        target[name] = withSugarNotification;
      }
  
      function wrapProp(target) {
        var val = target[method.prop];
        Object.defineProperty(target, method.prop, {
          get: function() {
            notify(method.message, method);
            return val;
          },
          set: function(newVal) {
            notify(method.message, method);
            val = newVal;
          }
        });
      }
  
      var ns = getNamespace(method.type);
  
      if (method.sName) {
        method.sName.split(',').forEach(function(name) {
          wrapMethod(ns, name);
        });
      }
      if (method.iName) {
        method.iName.split(',').forEach(function(name) {
          wrapMethod(ns.prototype, name);
        });
      }
      if (method.prop && DEFINE_PROPERTY_SUPPORT) {
        wrapProp(ns);
      }
  
      method.clean = method.message.replace(/%/g, '');
      method.id = id;
      method.pid = pad(id, 2, true);
    }