docs: def decode_str(s, free=False):
      """Decodes a SymbolicStr"""
      try:
          if s.len == 0:
              return u""
          return ffi.unpack(s.data, s.len).decode("utf-8", "replace")
      finally:
          if free:
              lib.semaphore_str_free(ffi.addressof(s))