Nearest-Neighbor Distributed Learning Under Communication Constraints