<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sumprod(seq):
 """ Product of tuple, or sum of products of lists of tuples. Parameters seq : tuple or list Returns ------- int : the product of input tuples, or the sum of products of lists of tuples, recursively. Examples -------- 6 10 11 """

    if isinstance(seq, tuple):
        # important to make sure dtype is int
        # since prod on empty tuple is a float (1.0)
        return np.prod(seq, dtype=int)
    else:
        return np.sum((sumprod(s) for s in seq), dtype=int)