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

Given an array of integers arr, return the number of subarrays with an odd sum.
Since the answer can be very large, return it modulo 109 + 7.
 
Please complete the following python code precisely:
```python
class Solution:
    def numOfSubarrays(self, arr: List[int]) -> int:
```