code: def _step1(state):
      """Steps 1 and 2 in the Wikipedia page."""
  
      # Step1: For each row of the matrix, find the smallest element and
      # subtract it from every element in its row.
      state.C -= state.C.min(axis=1)[:, np.newaxis]
      # Step2: Find a zero (Z) in the resulting matrix. If there is no
      # starred zero in its row or column, star Z. Repeat for each element
      # in the matrix.
      for i, j in zip(*np.where(state.C == 0)):
          if state.col_uncovered[j] and state.row_uncovered[i]:
              state.marked[i, j] = 1
              state.col_uncovered[j] = False
              state.row_uncovered[i] = False
  
      state._clear_covers()
      return _step3
  
file_path: catboost/contrib/python/scikit-learn/py2/sklearn/utils/linear_assignment_.py
imports: import numpy
  from .fixes import astype
label_desc: Use image node_id 3 for calling a global function with example usage: _step1(state) and returns: _step3