docs: def get_time_delta(time_string: str) -> timedelta:
      """
      Takes a time string (1 hours, 10 days, etc.) and returns
      a python timedelta object
  
      :param time_string: the time value to convert to a timedelta
      :type time_string: str
      :returns: datetime.timedelta for relative time
      :type datetime.timedelta
      """
      rel_time: Pattern = re.compile(
          pattern=r"((?P<hours>\d+?)\s+hour)?((?P<minutes>\d+?)\s+minute)?((?P<seconds>\d+?)\s+second)?((?P<days>\d+?)\s+day)?",
          # noqa
          flags=re.IGNORECASE,
      )
      parts: Optional[Match[AnyStr]] = rel_time.match(string=time_string)
      if not parts:
          raise Exception(f"Invalid relative time: {time_string}")
      # https://docs.python.org/3/library/re.html#re.Match.groupdict
      parts: Dict[str, str] = parts.groupdict()
      time_params = {}
      if all(value == None for value in parts.values()):
          raise Exception(f"Invalid relative time: {time_string}")
      for time_unit, magnitude in parts.items():
          if magnitude:
              time_params[time_unit]: int = int(magnitude)
      return timedelta(**time_params)