```
class Solution(object):
def depthSum(self, nestedList):
"""
:type nestedList: List[NestedInteger]
:rtype: int
"""
def findSum(nestedList, level):
sum = 0
for nestedInteger in nestedList:
if nestedInteger.isInteger():
sum += nestedInteger.getInteger() * level
else:
sum += findSum(nestedInteger.getList(), 1 + level)
return sum
return findSum(nestedList, 1)
```