* test_foreach: assert on arg _var_type
* [REF-2682] Foreach over dict uses Tuple arg value
When iterating over a Var with _var_type dict, the resulting arg value
_var_type should be Tuple[key, value] so it can be correctly used with other
var operations.
Fix#3157
* Correct _var_type for iteration over Tuple of multiple types
The arg value when iterating over a tuple could be any of the possible values
mentioned in the annotation.
When only one type is used, the Union collapses to the base type, at least in py3.11
* Add comments