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

Given a list of dominoes, dominoes[i] = [a, b] is equivalent to dominoes[j] = [c, d] if and only if either (a == c and b == d), or (a == d and b == c) - that is, one domino can be rotated to be equal to another domino.
Return the number of pairs (i, j) for which 0 <= i < j < dominoes.length, and dominoes[i] is equivalent to dominoes[j].
 
Please complete the following python code precisely:
```python
class Solution:
    def numEquivDominoPairs(self, dominoes: List[List[int]]) -> int:
```