Implement preliminary graph library