def coerce_int(value):
    try:
        num = int(value)
    except __HOLE__:
        try:
            num = int(float(value))
        except ValueError:
            return None
    if MIN_INT <= num <= MAX_INT:
        return num
    return None
dataset/ETHPy150Open graphql-python/graphql-core/graphql/core/type/scalars.py/coerce_int