<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_optional_attribute(self, element, attribute):
 """Attempt to retrieve an optional attribute from the xml and return None on failure."""

    try:
      return self.get_attribute(element, attribute)
    except self.XmlError:
      return None