def draw_ring(ring: ConsistentHashRing, dist: Dict(str, int), title: str): node_ids = sorted(ring.nodes.keys()) plt.figure(figsize=(8, 8)) ax = plt.gca() ax.set_title(title) if not node_ids: plt.text(0.5, 0.5, “Ring is empty”, ha=”center”, va=”center”) plt.axis(“off”) plt.show() return …
Tag:
