On the Nomizu conjecture and graph manifolds