Please solve the programming task below using a self-contained code snippet in a markdown code block.

The imbalance number of a 0-indexed integer array arr of length n is defined as the number of indices in sarr = sorted(arr) such that:

0 <= i < n - 1, and
sarr[i+1] - sarr[i] > 1

Here, sorted(arr) is the function that returns the sorted version of arr.
Given a 0-indexed integer array nums, return the sum of imbalance numbers of all its subarrays.
A subarray is a contiguous non-empty sequence of elements within an array.
 
Please complete the following python code precisely:
```python
class Solution:
    def sumImbalanceNumbers(self, nums: List[int]) -> int:
```