code: def convert_bool(s):
      s = s.strip().lower()
      if s == "true":
          return True
      elif s == "false" or not s:
          return False
      raise ValueError(
          "Invalid value (boolean literal expected): {}".format(s)
      )
  
imports: import itertools
  import json
  from copy import copy
  from logging import getLogger
  import six
  import yaml
label_desc: Use image node_id 2 for calling a global function with example usage: convert_bool(s) and returns: True, False