I'm using NetworkX to analyze a graph and compute the betweenness centrality for its nodes. I would like to set a specific cutoff for the shortest path length to control the calculation of betweenness centrality.
However, it seems that NetworkX's betweenness_centrality function does not have a built-in parameter for directly setting the cutoff. I'm wondering if there is a way to achieve this cutoff effect in NetworkX when computing betweenness centrality.
Is there any way to modify the source code of networkX's betweennness_centrlaity function to set the cutoff for betweenness centrality in NetworkX?