code: def try_encode(string, enc):
      "turn unicode encoding into a functional routine"
      try:
          return string.encode(enc)
      except UnicodeEncodeError:
          return None
  
imports: import unicodedata
  import sys
label_desc: Use image node_id 3 for calling a global function with example usage: try_encode(string, enc) and returns: string, None