code: def linear_assignment(cost_matrix):
      try:
          import lap
  
          _, x, y = lap.lapjv(cost_matrix, extend_cost=True)
          return np.array([[y[i], i] for i in x if i >= 0])
      except ImportError:
          from scipy.optimize import linear_sum_assignment
  
          x, y = linear_sum_assignment(cost_matrix)
          return np.array(list(zip(x, y)))
  
imports: import os
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: linear_assignment(cost_matrix) and returns: np, np