(y_i + y_{i-1}) \end{aligned}
When "x" and "y" have the same size, the computation is as
   described above and no broadcasting is needed. The broadcasting
   behavior of this function is as follows when their sizes are
   different. For both "x" and "y", the function computes the
   difference between consecutive elements along dimension "dim". This
   effectively creates two tensors, x_diff and y_diff, that have
   the same shape as the original tensors except their lengths along
   the dimension "dim" is reduced by 1. After that, those two tensors
   are broadcast together to compute final output as part of the
   trapezoidal rule. See the examples below for details.
Note:
 The trapezoidal rule is a technique for approximating the
 definite integral of a function by averaging its left and right
 Riemann sums. The approximation becomes more accurate as the
 resolution of the partition increases.

Parameters:
      * y (Tensor) -- Values to use when computing the