<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def solve_assignement(self, costs):
 """ Solves assignment problem using Hungarian implementation by Brian M. Clapper. @param costs: square cost matrix @return: assignment function @rtype: int->int """

        if costs is None or len(costs) == 0:
            return dict()

        n = costs.shape[0]

        pairs = [(i, j) for i in range(0, n) for j in range(0, n) if costs[i, j] < invalid_match]

        costs_list = [costs[i, j] for (i, j) in pairs]

        assignment = lapjv.lapjv(list(zip(*pairs))[0], list(zip(*pairs))[1], costs_list)

        indexes = enumerate(list(assignment[0]))

        return dict([(row, col) for row, col in indexes])