code: function (id) {
          var deps = getDependencies(id);
  
          if (deps.length) {
            deps.forEach(function (refId) {
              if (allDependencies.indexOf(refId) === -1) {
                allDependencies.push(refId);
  
                var item = instance.matrix.getItem(refId);
                if (item.deps.length) {
                  getTotalDependencies(refId);
                }
              }
            });
          }
        }
docs: get total dependencies
  @param {String} id