def create_gtr(params):
model = params.gtr<EOL>gtr_params = params.gtr_params<EOL>if model == '<STR_LIT>':<EOL><INDENT>gtr = GTR.standard('<STR_LIT>', alphabet='<STR_LIT>' if params.aa else '<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>kwargs = {}<EOL>if gtr_params is not None:<EOL><INDENT>for param in gtr_params:<EOL><INDENT>keyval = param.split('<STR_LIT:=>')<EOL>if len(keyval)!=<NUM_LIT:2>: continue<EOL>if keyval[<NUM_LIT:0>] in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>keyval[<NUM_LIT:0>] = '<STR_LIT>'<EOL>keyval[<NUM_LIT:1>] = list(map(float, keyval[<NUM_LIT:1>].split('<STR_LIT:U+002C>')))<EOL><DEDENT>elif keyval[<NUM_LIT:0>] not in ['<STR_LIT>']:<EOL><INDENT>keyval[<NUM_LIT:1>] = float(keyval[<NUM_LIT:1>])<EOL><DEDENT>kwargs[keyval[<NUM_LIT:0>]] = keyval[<NUM_LIT:1>]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>print ("<STR_LIT>")<EOL><DEDENT>gtr = GTR.standard(model, **kwargs)<EOL>infer_gtr = False<EOL><DEDENT>except:<EOL><INDENT>print ("<STR_LIT>")<EOL>gtr = GTR.standard('<STR_LIT>', alphabet='<STR_LIT>' if params.aa else '<STR_LIT>')<EOL>infer_gtr = False<EOL><DEDENT><DEDENT>return gtr<EOL>
parse the arguments referring to the GTR model and return a GTR structure