def smart_int(string, fallback=0):
    """Convert a string to int, with fallback for invalid strings or types."""
    try:
        return int(float(string))
    except (ValueError, __HOLE__, OverflowError):
        return fallback
dataset/ETHPy150Open mozilla/kitsune/kitsune/sumo/utils.py/smart_int