Meta Interview Question

implementing graph in python code