def split_type(self, typename):
name = self._canonicalize_type(typename)<EOL>if '<STR_LIT:(>' not in name:<EOL><INDENT>return name, False, []<EOL><DEDENT>base, sub = name.split('<STR_LIT:(>')<EOL>if len(sub) == <NUM_LIT:0> or sub[-<NUM_LIT:1>] != '<STR_LIT:)>':<EOL><INDENT>raise ArgumentError("<STR_LIT>", passed_type=typename, basetype=base, subtype_string=sub)<EOL><DEDENT>sub = sub[:-<NUM_LIT:1>]<EOL>subs = sub.split('<STR_LIT:U+002C>')<EOL>return base, True, subs<EOL>
Given a potentially complex type, split it into its base type and specializers