Algorithm for K-best NON perfect bipartite matchings

From a cost matrix of shape $$n\times m$$ with $$n, it is easy to add nodes that will not change anything by giving all their incident edges the same weight $$w$$, that is adding $$(m-n)*m$$ edges.