On the integrability of N = 2 Landau-Ginzburg models. A graph generalization of the Yang-Baxter equation