def score_leaves(self) -> Set[BaseEntity]:
leaves = set(self.iter_leaves())<EOL>if not leaves:<EOL><INDENT>log.warning('<STR_LIT>')<EOL>return set()<EOL><DEDENT>for leaf in leaves:<EOL><INDENT>self.graph.nodes[leaf][self.tag] = self.calculate_score(leaf)<EOL>log.log(<NUM_LIT:5>, '<STR_LIT>', leaf)<EOL><DEDENT>return leaves<EOL>
Calculate the score for all leaves.

        :return: The set of leaf nodes that were scored