code: def to_fs_from_unicode(unic):
      
      if is_unicode(unic):
          try:
              string = unic.encode(FS_ENCODING)
          except (UnicodeError, TypeError):
              pass
          else:
              return string
      return unic
docs: Return a byte string version of unic encoded using the file 
      system encoding.