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 the number of non-empty subarrays that have a sum divisible by k.
A subarray is a contiguous part of an array.
 
Please complete the following python code precisely:
```python
class Solution:
    def subarraysDivByK(self, nums: List[int], k: int) -> int:
```