Probability computing method in sample_neighbors function

In sample_neighbors function, the prob argument determines the sampling probability for each neighbor. Because there is no requirement for the value of prob except positive, I want to know how is this probability computed and the normalization approach used.

Thank you very much.

The probability will be proportional to the values you supplied.