(name: str, fn: PathSearchFunctionType)
Add path finding function ``fn`` as an option with ``name``.
Add path finding function ``fn`` as an option with ``name``.
Add path finding function fn as an option with name .
def register_path_fn(name: str, fn: PathSearchFunctionType) -> None:
    """Add path finding function ``fn`` as an option with ``name``."""
    if name in _PATH_OPTIONS:
        raise KeyError("Path optimizer '{}' already exists.".format(name))

    _PATH_OPTIONS[name.lower()] = fn
def register_path_fn ( name : str , fn : PathSearchFunctionType ) -> None : if name in _PATH_OPTIONS : raise KeyError ( "Path optimizer '{}' already exists." . format ( name ) ) _PATH_OPTIONS [ name . lower ( ) ] = fn