def expand_type(self, t, generator):
        if isinstance(t, list):
            if t[0] == 'Tuple':
                return generator.types['Tuple']([self.expand_type(base, generator) for base in t[1:]])
            else:
                return generator.types[t[0]].format(*[self.expand_type(base, generator) for base in t[1:]])
        elif t in generator.types:
            return generator.types[t]
        else:
            return t
dataset/ETHPy150Open alehander42/pseudo/pseudo/code_generator_dsl.py/PseudoType.expand_type/original