R code to python conversion

Job ID: 32880367

Budget: $30 – $250 CAD

I have 245 lines of R code (excluding comments) that I need to convert into python as one program. Basically, they are R functions which are also used in other subsequent functions.
The code is written in base R. So, there's no need to use ML libraries. Numpy and pandas should suffice in addition to one more python library.
At the end of the project, its full functionality should be tested and you should provide the results that mimics R results.
It's not just about translating the code. It's also about making it functional.

https://github.com/ukgovdatascience/wmms/tree/master/R

The main one being this:
https://github.com/ukgovdatascience/wmms/blob/master/R/wmms.R

As input, it get a file that has been computed with this:
https://github.com/allanvc/emstreeR/blob/master/R/ComputeMST.R

When you provide it X, Y coordinates, it calculate the Euclidean minimum spanning tree and returns, source, destination, and distance (weight)