code: def check_string_type(value, title):
      if type(value) is str:
          return value
      raise AssertionError(
          "{0} must be of type str (got {1})".format(title, repr(value))
      )
  
imports: import re
  import sys
  import warnings
label_desc: Use image node_id 2 for calling a global function with example usage: check_string_type(value, title) and returns: value