Ho,
The problem is that expand does not take a tuple as argument, you should write .expand(2,2) and not .expand((2,2)).
I think a check is missing here 1 to ensure that we have a single list/tuple of ints.