def parse_int_literal(ast):
    if isinstance(ast, IntValue):
        num = int(ast.value)
        if MIN_INT <= num <= MAX_INT:
            return num
dataset/ETHPy150Open graphql-python/graphql-core/graphql/core/type/scalars.py/parse_int_literal/original