Example code for structural learning