code: def locale_encoding():
      try:
          if six.PY3:
              loc = locale.getencoding()
          else:
              loc = locale.getdefaultlocale()[1]
          if loc:
              codecs.lookup(loc)
          return loc
      except LookupError as e:
          logger.debug("Cannot get system locale: %s", e)
          return None
      except ValueError as e:
          logger.debug("Cannot get system locale: %s", e)
          return None
  
imports: import locale
  import logging
  import six
  import sys
  import codecs
  import library.python.func
label_desc: Use image node_id 9 for calling a global function with example usage: locale_encoding() and returns: loc, None, None