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

Given an integer array nums, find a subarray that has the largest product, and return the product.
The test cases are generated so that the answer will fit in a 32-bit integer.
 
Please complete the following python code precisely:
```python
class Solution:
    def maxProduct(self, nums: List[int]) -> int:
```