code: def parse_timedelta(ev):
      
  
      chunks = ev['event-duration'].split()
      tdargs = {}
      for c in chunks:
          try:
              m = TIME_MULTIPLIERS[c[-1]]
              val = int(c[:-1])
              tdargs[m] = val
          except KeyError:
              log.error("""Unknown time multiplier '%s' value in the \
  'event-duration' field in the '%s' event. Supported multipliers \
  are: '%s'.""" % (c, ev['title'], ' '.join(TIME_MULTIPLIERS)))
              raise RuntimeError("Unknown time multiplier '%s'" % c)
          except ValueError:
              log.error("""Unable to parse '%s' value in the 'event-duration' \
  field in the '%s' event.""" % (c, ev['title']))
              raise ValueError("Unable to parse '%s'" % c)
  
  
      return timedelta(**tdargs)
docs: Parse a timedelta string in format [<num><multiplier> ]*
      e.g. 2h 30m
  
      :returns: timedelta