ad from traces. So, there is an
      // inconsistency: either the bins are reported incorrectly, or the sum is
      // reported incorrectly.
      //
      // Similarly, if shift is greater than 0.5, the sum of samples cannot add
      // up to the sum we read from traces, even if we put all samples at the
      // highest value of their bins.
      if (isLinear && Math.abs(shift) > 0.5) {
        throw new Error(`Samples sum is wrong for ${name}.`);
      }

      for (const bin of values.bins) {
       