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

You are given a 0-indexed array of n integers arr.
The interval between two elements in arr is defined as the absolute difference between their indices. More formally, the interval between arr[i] and arr[j] is |i - j|.
Return an array intervals of length n where intervals[i] is the sum of intervals between arr[i] and each element in arr with the same value as arr[i].
Note: |x| is the absolute value of x.
 
Please complete the following python code precisely:
```python
class Solution:
    def getDistances(self, arr: List[int]) -> List[int]:
```