def assign_node_labels_and_sizes(self):
<EOL>nvals = self.ttree.get_node_values()<EOL>if self.style.node_labels is False:<EOL><INDENT>self.node_labels = ["<STR_LIT>" for i in nvals]           <EOL>if self.style.node_sizes is not None:<EOL><INDENT>if isinstance(self.style.node_sizes, (list, tuple, np.ndarray)):<EOL><INDENT>assert len(self.node_sizes) == len(self.style.node_sizes)<EOL>self.node_sizes = self.style.node_sizes<EOL><DEDENT>elif isinstance(self.style.node_sizes, (int, str)):<EOL><INDENT>self.node_sizes = (<EOL>[int(self.style.node_sizes)] * len(nvals)<EOL>)<EOL><DEDENT>self.node_labels = ["<STR_LIT:U+0020>" if i else "<STR_LIT>" for i in self.node_sizes]<EOL><DEDENT><DEDENT>elif self.style.node_labels is True:<EOL><INDENT>self.style.node_hover = True<EOL>self.node_labels = self.ttree.get_node_values('<STR_LIT>', <NUM_LIT:1>, <NUM_LIT:1>)<EOL>if not self.style.node_sizes:<EOL><INDENT>self.node_sizes = [<NUM_LIT>] * len(nvals)<EOL><DEDENT>else:<EOL><INDENT>assert isinstance(self.style.node_sizes, (int, str))<EOL>self.node_sizes = (<EOL>[int(self.style.node_sizes)] * len(nvals)<EOL>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if isinstance(self.style.node_labels, list):<EOL><INDENT>assert len(self.style.node_labels) == len(nvals)<EOL>self.node_labels = self.style.node_labels<EOL><DEDENT>elif isinstance(self.style.node_labels, str):<EOL><INDENT>self.node_labels = [self.style.node_labels] * len(nvals)<EOL>if self.style.node_labels in self.ttree.features:<EOL><INDENT>self.node_labels = self.ttree.get_node_values(<EOL>self.style.node_labels, <NUM_LIT:1>, <NUM_LIT:0>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.node_labels = self.ttree.get_node_values("<STR_LIT>", <NUM_LIT:1>, <NUM_LIT:0>)<EOL><DEDENT>if isinstance(self.style.node_sizes, list):<EOL><INDENT>assert len(self.style.node_sizes) == len(nvals)<EOL>self.node_sizes = self.style.node_sizes<EOL><DEDENT>elif isinstance(self.style.node_sizes, (str, int, float)):<EOL><INDENT>self.node_sizes = [int(self.style.node_sizes)] * len(nvals)<EOL><DEDENT>else:<EOL><INDENT>self.node_sizes = [<NUM_LIT>] * len(nvals)<EOL><DEDENT>for nidx, node in enumerate(self.node_labels):<EOL><INDENT>if self.node_labels[nidx] == "<STR_LIT>":<EOL><INDENT>self.node_sizes[nidx] = <NUM_LIT:0><EOL><DEDENT><DEDENT><DEDENT>self.node_labels = [str(i) for i in self.node_labels]<EOL>
assign features of nodes to be plotted based on user kwargs