Links associated with generic immersions of graphs