(cls, graph_class)
Registers an graph class.

        The graph classes are identified by their lower case name.

        Args:
            graph_class (type): the graph class to register.

        Raises:
            KeyError: if class is already set for the corresponding name.
Registers an graph class.
Registers an graph class .
def register_graph(cls, graph_class):
        """Registers an graph class.

        The graph classes are identified by their lower case name.

        Args:
            graph_class (type): the graph class to register.

        Raises:
            KeyError: if class is already set for the corresponding name.
        """
        graph_name = graph_class.NAME.lower()
        if graph_name in cls._class_registry:
            raise KeyError(f'Class already set for name: {graph_class.NAME}.')
        cls._class_registry[graph_name] = graph_class
def register_graph ( cls , graph_class ) : graph_name = graph_class . NAME . lower ( ) if graph_name in cls . _class_registry : raise KeyError ( f'Class already set for name: {graph_class.NAME}.' ) cls . _class_registry [ graph_name ] = graph_class