def _get_duration(element):
 return ((element._stopped - element._started).seconds if hasattr(element, '_started') else None)

def _get_duration ( element ) : return ( ( element . _stopped - element . _started ) . seconds if hasattr ( element , '_started' ) else None )
return the duration of an element .