Retrieving labels for nodes