code: def timestr_to_int(time_str):
      """Parse the test time set in the yaml configuration file and convert it to int type"""
      if isinstance(time_str, int) or time_str.isdigit():
          time_int = int(time_str)
      elif time_str.endswith("s"):
          time_int = int(time_str.split("s")[0])
      elif time_str.endswith("m"):
          time_int = int(time_str.split("m")[0]) * 60
      elif time_str.endswith("h"):
          time_int = int(time_str.split("h")[0]) * 60 * 60
      else:
          raise Exception("%s not support" % time_str)
      return time_int
  
imports: import time
  import logging
  import string
  import random
  import requests
  import json
  import os
  from yaml.representer import SafeRepresenter
  import yaml
  import tableprint
  import config
label_desc: Use image node_id 1 for calling a global function with example usage: timestr_to_int(time_str) and returns: time_int