@staticmethod
def pretty_to_seconds(pretty_duration):
    """Converts pretty printed timestamp to seconds
        """
    millis_split = pretty_duration.split('.')
    millis = 0
    if len(millis_split) == 2:
        millis = int(millis_split[1])
        left = millis_split[0]
    else:
        left = pretty_duration
    left_split = left.split(':')
    if len(left_split) < 3:
        hours = 0
        minutes = int(left_split[0])
        seconds = int(left_split[1])
    else:
        hours = int(left_split[0])
        minutes = int(left_split[1])
        seconds = int(left_split[2])
    result = millis / 1000.0 + seconds + minutes * 60 + hours * 3600
    return result
