changed graph_element to graph_type according to the AST
write the printing function to print AST
Writing print function for ast