code: def compute_node_sizes(self):
          
          if type(self.node_size) is str:
              nodes = self.graph.nodes
              self.node_sizes = [nodes[n][self.node_size] for n in self.nodes]
          else:
              self.node_sizes = self.node_size
docs: Compute the node sizes.