code: def fs_str(string):
      
  
      if isinstance(string, str):
          return string
      assert not isinstance(string, bytes)
      return string.encode(_fs_encoding)
docs: Encodes a string into the proper filesystem encoding
  
      Borrowed from pip-tools