def _parse_limit(self, element):
<EOL>limit_type = attribute(element, '<STR_LIT:type>', '<STR_LIT:user>')<EOL>unit_conversions = {<EOL>'<STR_LIT>': <NUM_LIT:1>,<EOL>'<STR_LIT>': <NUM_LIT>,<EOL>'<STR_LIT>':   <NUM_LIT>,<EOL>'<STR_LIT>':    <NUM_LIT>,<EOL>'<STR_LIT>':   <NUM_LIT>,<EOL>'<STR_LIT>':  <NUM_LIT>,<EOL>'<STR_LIT>':   <NUM_LIT><EOL>}<EOL>units = attribute(element, '<STR_LIT>', '<STR_LIT>')<EOL>if units not in unit_conversions:<EOL><INDENT>self._log.warn('<STR_LIT>'.format(unit=units))<EOL>return<EOL><DEDENT>try:<EOL><INDENT>limit = float(element.text)<EOL><DEDENT>except (ValueError, TypeError):<EOL><INDENT>self._log.warn('<STR_LIT>'<EOL>.format(limit=element.text))<EOL>return<EOL><DEDENT>if limit_type == '<STR_LIT>':<EOL><INDENT>self.global_limit = limit * unit_conversions[units]<EOL>self.glimit_blocking = bool_attribute(element, '<STR_LIT>', self.glimit_blocking)<EOL><DEDENT>elif limit_type == '<STR_LIT:user>':<EOL><INDENT>self.user_limit = limit * unit_conversions[units]<EOL>self.ulimit_blocking = bool_attribute(element, '<STR_LIT>', self.ulimit_blocking)<EOL><DEDENT>return<EOL>
Parse a limit element
:param element: The XML Element object
:type  element: etree._Element