code: def encode(value, encoding=DEFAULT_ENCODING):
      if isinstance(value, six.binary_type):
          value = value.decode(encoding, errors="ignore")
      return value.encode(encoding)
  
imports: import locale
  import logging
  import six
  import sys
  import codecs
  import library.python.func
label_desc: Use image node_id 13 for calling a global function with example usage: encode(value, encoding) and returns: value