How to predict the volume of diffusion pathways in structure?

Hi, I am trying to calculate (or predict) the volume of diffusion pathways in structure, but it seems pymatgen can not meet my requirement. Any quick suggestions a will help me a lot here.

This is kind of possible we have done something similar with when integrating charge in a tube between two sites, if you have the exact path you can also set up a grid and then move a sphere along the path slowly and get the integrated volume:
You can look at my code here for an example of how this can be done: