a fork() of DiaNMS written in python