Revert "Revert "Fixed Graph: prepare function should work without semiring""
Revert "Revert "Fixed Graph: prepare function should work without semiring""

This reverts commit d2236e02a2dec29684d78136e0d868f8001ec17a.

char-lie/mfm,char-lie/patterns_recognition,char-lie/mfm,char-lie/mfm,char-lie/patterns_recognition