parameters: (self, time_string)
docstring: Transform time string to timedelta or second, only support 'weeks(W), days(D),
          hours(H), minutes(M), seconds(S)
          :param time_string: string,  time string like '10S', '20H', '3W'.
docstring_summary: Transform time string to timedelta or second, only support 'weeks(W), days(D),
          hours(H), minutes(M), seconds(S)
          :param time_string: string,  time string like '10S', '20H', '3W'.
docstring_tokens: Transform time string to timedelta or second only support weeks ( W ) days ( D ) hours ( H ) minutes ( M ) seconds ( S ) : param time_string : string time string like 10S 20H 3W .
function: def __init__(self, time_string):
          """
          Transform time string to timedelta or second, only support 'weeks(W), days(D),
          hours(H), minutes(M), seconds(S)
          :param time_string: string,  time string like '10S', '20H', '3W'.
          """
          self._str = time_string
          num, self._unit = re.match(r'(\d+)?([WDHMS])', time_string).groups()
  
          if self._unit is None:
              raise ValueError('Incorrect format %s.' % time_string)
          if num is None:
              self._val = 1
          else:
              self._val = int(num)
function_tokens: def __init__ ( self , time_string ) : self . _str = time_string num , self . _unit = re . match ( r'(\d+)?([WDHMS])' , time_string ) . groups ( ) if self . _unit is None : raise ValueError ( 'Incorrect format %s.' % time_string ) if num is None : self . _val = 1 else : self . _val = int ( num )