Python implementation of the R function