def _parse_timespan(timespan):
 if (timespan in ('', 'NOT_IMPLEMENTED', None)):
  return None
 else:
  return sum((((60 ** x[0]) * int(x[1])) for x in enumerate(reversed(timespan.split(':')))))

def _parse_timespan ( timespan ) : if ( timespan in ( '' , 'NOT_IMPLEMENTED' , None ) ) : return None else : return sum ( ( ( ( 60 ** x [ 0 ] ) * int ( x [ 1 ] ) ) for x in enumerate ( reversed ( timespan . split ( ':' ) ) ) ) )
parse a time-span into number of seconds .