'Returns the last element of the trace that is not an error.
This element will contain the final component indicated by the trace.
Returns:
The last element of the trace that is not an error.'

def GetLastHealthyElement(self):

    for element in reversed(self.elements):
        if (not element.HasError()):
            return element
