def get_thunk_type_set():
 it_types = []
 i_types = []
 j = 0
 getter_code = '    if (0) {}'
 for (I_typenum, I_type) in I_TYPES:
  piece = '\n        else if (I_typenum == %(I_typenum)s) {\n            if (T_typenum == -1) { return %(j)s; }'
  getter_code += (piece % dict(I_typenum=I_typenum, j=j))
  i_types.append((j, I_typenum, None, I_type, None))
  j += 1
  for (T_typenum, T_type) in T_TYPES:
   piece = '\n            else if (T_typenum == %(T_typenum)s) { return %(j)s; }'
   getter_code += (piece % dict(T_typenum=T_typenum, j=j))
   it_types.append((j, I_typenum, T_typenum, I_type, T_type))
   j += 1
  getter_code += '\n        }'
 return (i_types, it_types, (GET_THUNK_CASE_TEMPLATE % dict(content=getter_code)))

def get_thunk_type_set ( ) : it_types = [ ] i_types = [ ] j = 0 getter_code = '    if (0) {}' for ( I_typenum , I_type ) in I_TYPES : piece = '\n        else if (I_typenum == %(I_typenum)s) {\n            if (T_typenum == -1) { return %(j)s; }' getter_code += ( piece % dict ( I_typenum = I_typenum , j = j ) ) i_types . append ( ( j , I_typenum , None , I_type , None ) ) j += 1 for ( T_typenum , T_type ) in T_TYPES : piece = '\n            else if (T_typenum == %(T_typenum)s) { return %(j)s; }' getter_code += ( piece % dict ( T_typenum = T_typenum , j = j ) ) it_types . append ( ( j , I_typenum , T_typenum , I_type , T_type ) ) j += 1 getter_code += '\n        }' return ( i_types , it_types , ( GET_THUNK_CASE_TEMPLATE % dict ( content = getter_code ) ) )
get a list containing cartesian product of data types .