from typing import Union
from typing import List


def nested_sum(obj: Union[int, List]) -> int:
    """Return the sum of the numbers in a nested list.

    Note that a obj is one of two things:
      1. a number
      2. a list of (less deep) nested lists


    >>> nested_sum([1, [2], [3, 4], [[5, 6], 7]])
    28
    >>> nested_sum([[1, [2]], [[[3]]], 4, [[5, 6], [[[7]]]]])
    28
    """
    if isinstance(obj, int):
        return obj
    else:
        return sum(nested_sum(i) for i in obj)