The logic for the identification of the best distribution fit in the get_best() function when the ks_statistic method is selected is backwards given the null hypothesis of the KS test. It looks like the get_best() function is returning the distribution with the minimum KS p-value. But the null hypothesis of the KS test is that the sample is distributed according to the reference distribution. And selecting the model with the minimum KS p-value means we're potentially picking the worst fitting distribution.
The logic for the identification of the best distribution fit in the get_best() function when the ks_statistic method is selected is backwards given the null hypothesis of the KS test. It looks like the get_best() function is returning the distribution with the minimum KS p-value. But the null hypothesis of the KS test is that the sample is distributed according to the reference distribution. And selecting the model with the minimum KS p-value means we're potentially picking the worst fitting distribution.