code: def parse_duration(duration_str):
      parts = duration_regex.match(duration_str)
      if not parts:
          return None
      parts = parts.groupdict()
      time_params = {}
      for name, param in parts.items():
          if param:
              time_params[name] = int(param)
      retval = timedelta(**time_params)
      return retval
  
imports: import hashlib
  from io import StringIO
  from datetime import timedelta
  import re
  import random
  import string
  import time
  import sys
  import shutil
  import shlex
  import os
  import tempfile
  import uuid
label_desc: Use image node_id 15 for calling a global function with example usage: parse_duration(duration_str) and returns: retval, None