def _recognize_basic_types(s):
tps = [int, float]<EOL>if not six.PY3:  <EOL><INDENT>tps.append(long)<EOL><DEDENT>for tp in tps:<EOL><INDENT>try:<EOL><INDENT>return tp(s)<EOL><DEDENT>except ValueError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>if s.lower() == '<STR_LIT:true>':<EOL><INDENT>return True<EOL><DEDENT>if s.lower() == '<STR_LIT:false>':<EOL><INDENT>return False<EOL><DEDENT>if s.lower() in ['<STR_LIT:none>', '<STR_LIT:null>']:<EOL><INDENT>return None<EOL><DEDENT>return s<EOL>
If value of given string `s` is an integer (or long), float or boolean, convert it
    to a proper type and return it.