Implment the get network edges function.