import osmnx as ox from src.helper.duplicate_removal import remove_duplicates def generate_graph(city_name, debug_mode=False): """ Génère un graphe à partir du nom d'une ville en utilisant OSMnx. Parameters: city_name : Le nom de la ville pour laquelle générer le graphe. Returns: MultiDiGraph : Le graphe généré. """ # Generate the graph from the city name GRAPH = ox.graph_from_place(city_name, network_type='drive') GRAPH = remove_duplicates(GRAPH, debug_mode) return GRAPH