code: def test_linear_sum_assignment_input_validation():
      assert_raises(ValueError, linear_sum_assignment, [1, 2, 3])
  
      C = [[1, 2, 3], [4, 5, 6]]
      assert_array_equal(
          linear_sum_assignment(C), linear_sum_assignment(np.asarray(C))
      )
      assert_array_equal(
          linear_sum_assignment(C), linear_sum_assignment(matrix(C))
      )
  
      I = np.identity(3)
      assert_array_equal(
          linear_sum_assignment(I.astype(np.bool_)),
          linear_sum_assignment(I),
      )
      assert_raises(ValueError, linear_sum_assignment, I.astype(str))
  
      I[0][0] = np.nan
      with pytest.raises(
          ValueError, match="contains invalid numeric entries"
      ):
          linear_sum_assignment(I)
  
      I = np.identity(3)
      I[1][1] = -np.inf
      with pytest.raises(
          ValueError, match="contains invalid numeric entries"
      ):
          linear_sum_assignment(I)
  
      I = np.identity(3)
      I[:, 0] = np.inf
      with pytest.raises(ValueError, match="cost matrix is infeasible"):
          linear_sum_assignment(I)
  
file_path: catboost/contrib/python/scipy/py3/scipy/optimize/tests/test_linear_assignment.py
imports: from numpy.testing import assert_array_equal
  from pytest import raises
  import pytest
  import numpy
  from scipy.optimize import linear_sum_assignment
  from scipy.sparse import random
  from scipy.sparse.sputils import matrix
  from scipy.sparse.csgraph import min_weight_full_bipartite_matching
  from scipy.sparse.csgraph.tests.test_matching import linear_sum_assignment_assertions, linear_sum_assignment_test_cases
label_desc: Use image node_id 1 for calling a global function with example usage: test_linear_sum_assignment_input_validation() without return types