@staticmethod
def safe_integer(dictionary, key, default_value=None):
    if ((key is None) or (key not in dictionary)):
        return default_value
    value = dictionary[key]
    if (isinstance(value, Number) or (isinstance(value, basestring) and value.isnumeric())):
        return int(value)
    return default_value
@staticmethod
def safe_integer(dictionary, key, default_value=None):
    if ((key is None) or (key not in dictionary)):
        return default_value
    value = dictionary[key]
    if (isinstance(value, Number) or (isinstance(value, basestring) and value.isnumeric())):
        return int(value)
    return default_value