code: def filesys_decode(path):
      """
      Ensure that the given path is decoded,
      NONE when no expected encoding works
      """
  
      if isinstance(path, six.text_type):
          return path
  
      fs_enc = sys.getfilesystemencoding() or "utf-8"
      candidates = fs_enc, "utf-8"
  
      for enc in candidates:
          try:
              return path.decode(enc)
          except UnicodeDecodeError:
              continue
  
imports: import unicodedata
  import sys
  from setuptools.extern import six
label_desc: Use image node_id 2 for calling a global function with example usage: filesys_decode(path) and returns: path, path