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

Given an integer array nums and an integer k, return true if it is possible to divide this array into k non-empty subsets whose sums are all equal.
 
Please complete the following python code precisely:
```python
class Solution:
    def canPartitionKSubsets(self, nums: List[int], k: int) -> bool:
```