def _weisfeiler_lehman(self, kg: KG) -> None:
    'Performs Weisfeiler-Lehman relabeling of the vertices.\n\n        Args:\n            kg: The Knowledge Graph.\n\n                The graph from which the neighborhoods are extracted for the\n                provided entities.\n\n        '
    for vertex in kg._vertices:
        self._label_map[vertex][0] = vertex.name
        self._inv_label_map[vertex][0] = vertex.name
    for n in range(1, (self.wl_iterations + 1)):
        for vertex in kg._vertices:
            if self.md5_bytes:
                self._label_map[vertex][n] = str(md5(self._create_label(kg, vertex, n).encode()).digest()[:self.md5_bytes])
            else:
                self._label_map[vertex][n] = str(self._create_label(kg, vertex, n))
    for vertex in kg._vertices:
        for (k, v) in self._label_map[vertex].items():
            self._inv_label_map[vertex][v] = k
Performs Weisfeiler-Lehman relabeling of the vertices.

Args:
    kg: The Knowledge Graph.

        The graph from which the neighborhoods are extracted for the
        provided entities.
def _weisfeiler_lehman(self, kg: KG) -> None:
    'Performs Weisfeiler-Lehman relabeling of the vertices.\n\n        Args:\n            kg: The Knowledge Graph.\n\n                The graph from which the neighborhoods are extracted for the\n                provided entities.\n\n        '
    for vertex in kg._vertices:
        self._label_map[vertex][0] = vertex.name
        self._inv_label_map[vertex][0] = vertex.name
    for n in range(1, (self.wl_iterations + 1)):
        for vertex in kg._vertices:
            if self.md5_bytes:
                self._label_map[vertex][n] = str(md5(self._create_label(kg, vertex, n).encode()).digest()[:self.md5_bytes])
            else:
                self._label_map[vertex][n] = str(self._create_label(kg, vertex, n))
    for vertex in kg._vertices:
        for (k, v) in self._label_map[vertex].items():
            self._inv_label_map[vertex][v] = k