code: def parse_timedelta(__delta: str) -> datetime.timedelta:
      
      match = re.fullmatch(r"""
              ^(\d+(?:|\.\d+))  # value, possibly float
              \ *
              ([hdwmy])$  # units
           """, __delta, re.IGNORECASE | re.VERBOSE)
      if not match:
          raise ValueError('Invalid ‘frequency’ value')
      value, units = match.groups()
      units_i = 'hdwmy'.index(units.lower())
      # hours per hour/day/week/month/year
      multiplier = (1, 24, 168, 672, 8760)
      return datetime.timedelta(hours=float(value) * multiplier[units_i])
docs: Parse human readable frequency.
  
      Args:
          __delta: Frequency to parse