code: def word_pattern(pattern, str):
      dict = {}
      set_value = set()
      list_str = str.split()
      if len(list_str) != len(pattern):
          return False
      for i in range(len(pattern)):
          if pattern[i] not in dict:
              if list_str[i] in set_value:
                  return False
              dict[pattern[i]] = list_str[i]
              set_value.add(list_str[i])
          else:
              if dict[pattern[i]] != list_str[i]:
                  return False
      return True
  
label_desc: Use image node_id 1 for calling a global function with example usage: word_pattern(pattern, str) and returns: True, False, False, False