docs: function getCommonDeps(name, deps, opts) {
  
      function exceedsThreshold(ctx, row) {
          return (ctx.rows[row.id].length > opts.threshold && gce(R.pluck("level", ctx.rows[row.id])) === name) || ctx.ensureCommon[row.id];
      }
  
      return deps.filter(R.compose(R.contains(name), R.prop("level"))).aggregate({ rows: {}, ensureCommon: {} }, function (ctx, row) {
          if (!ctx.rows[row.id]) {
              ctx.rows[row.id] = [];
          }
          ctx.rows[row.id].push(row);
  
          if (exceedsThreshold(ctx, row)) {
              R.each(function (id) { ctx.ensureCommon[id] = true; }, R.values(row.deps));
          }
          return ctx;
      }).map(function (ctx) {
          var rowValues = R.flatten(R.values(ctx.rows));
          var externals = R.filter(R.prop("external"), rowValues);
          var requires = R.filter(R.curry(exceedsThreshold)(ctx), R.reject(R.prop("external"), rowValues));
          var childDeps = R.filter(function (row) {
              return !R.containsWith(R.eqProps("id"), row, externals) && !R.containsWith(R.eqProps("id"), row, requires);
          }, rowValues);
  
          return { externals: externals, requires: requires, childDeps: childDeps };
      }).single();
  }