def METHOD_NAME(cls, op: "TensorTrapz"):
    from .diff import diff
    y = astensor(op.y)
    x = op.x
    axis = op.axis
    if x is not None:
        x = astensor(x)
        # rechunk x to make x.nsplits == y.nsplits
        if has_unknown_shape(x, y):
            yield
        x = yield from recursive_tile(x.rechunk(y.nsplits))
    if len(y.chunks) == 1:
        return cls._tile_one_chunk(op, y, x)
    if x is None:
        d = op.dx
    else:
        if x.ndim == 1:
            d = diff(x)
            # reshape to correct shape
            shape = [1] * y.ndim
            shape[axis] = d.shape[0]
            d = d.reshape(shape)
        else:
            d = diff(x, axis=axis)
    nd = y.ndim
    slice1 = [slice(None)] * nd
    slice2 = [slice(None)] * nd
    slice1[axis] = slice(1, None)
    slice2[axis] = slice(None, -1)
    ret = (d * (y[tuple(slice1)] + y[tuple(slice2)]) / 2.0).sum(axis)
    return [(yield from recursive_tile(ret))]