def int_attribute(element, attribute, default=<NUM_LIT:0>):
attribute_value = element.get(attribute)<EOL>if attribute_value:<EOL><INDENT>try:<EOL><INDENT>return int(attribute_value)<EOL><DEDENT>except (TypeError, ValueError):<EOL><INDENT>return default<EOL><DEDENT><DEDENT>return default<EOL>
Returns the int value of an attribute, or a default if it's not defined
:param element: The XML Element object
:type  element: etree._Element

:param attribute: The name of the attribute to evaluate
:type  attribute: basestring

:param default: The default value to return if the attribute is not defined
:type  default: int

:rtype: int