def __eval_arg(arg, thrift_types):
    """Evaluate a commandline argument within the scope of the IF types"""
    code_globals = {}
    code_globals.update(thrift_types)
    code = compile(arg, '<command_line>', 'eval', 0, 1)
    return eval(code, code_globals)
