code: def to_unicode(value, from_enc=DEFAULT_ENCODING):
      if isinstance(value, six.text_type):
          return value
      if isinstance(value, six.binary_type):
          if six.PY2:
              return unicode(
                  value, from_enc, ENCODING_ERRORS_POLICY
              )  # noqa
          else:
              return value.decode(
                  from_enc, errors=ENCODING_ERRORS_POLICY
              )
      return six.text_type(value)
  
imports: import locale
  import logging
  import six
  import sys
  import codecs
  import library.python.func
label_desc: Use image node_id 3 for calling a global function with example usage: to_unicode(value, from_enc) and returns: six, value, unicode, value