code: def interval_str_to_duration_ms(interval_str: str) -> int:
      """Parses interval strings into how long they represent in ms.
      Supported intervals:
        - seconds (e.g. 1s)
        - minutes (e.g. 5m)
        - hours (e.g. 1h)
        - days (e.g. 5d)
        - weeks (e.g. 1w)
      """
      duration_match = re.search(r"^\d+", interval_str)
      time_unit_match = re.search("[smhdw]", interval_str)
      if not duration_match or not time_unit_match:
          raise ValueError("Invalid interval {}".format(interval_str))
      duration = int(duration_match.group())
      time_unit = time_unit_match.group()
      if time_unit == "s":
          return duration * 1000
      if time_unit == "m":
          return duration * 1000 * 60
      if time_unit == "h":
          return duration * 1000 * 60 * 60
      if time_unit == "d":
          return duration * 1000 * 60 * 60 * 24
      if time_unit == "w":
          return duration * 1000 * 60 * 60 * 24 * 7
  
imports: import datetime
  import pytz
  import re
label_desc: Use image node_id 5 for calling a global function with example usage: interval_str_to_duration_ms(interval_str) and returns: unknown, unknown, unknown, unknown, unknown