I find it surprisingly difficult to find information on this issue on the internet. Until now I've only found this preview of an article: https://www.jstor.org/stable/3615434?seq=1#page_scan_tab_contents
Still, I can hardly believe that nobody has made some efforts to make a python algorithm to solve this classical problem so I'm still hoping.... -- https://mail.python.org/mailman/listinfo/python-list