sample for generating a object relationship graph using templates