code: def test_initial_constraints_as_canonical_empty():
      n = 3
      for sparse_jacobian in [False, True]:
          c_eq, c_ineq, J_eq, J_ineq = initial_constraints_as_canonical(
              n, [], sparse_jacobian
          )
  
          assert_array_equal(c_eq, [])
          assert_array_equal(c_ineq, [])
  
          if sparse_jacobian:
              J_eq = J_eq.toarray()
              J_ineq = J_ineq.toarray()
  
          assert_array_equal(J_eq, np.empty((0, n)))
          assert_array_equal(J_ineq, np.empty((0, n)))
  
file_path: scipy/scipy/optimize/_trustregion_constr/tests/test_canonical_constraint.py
imports: import numpy
  from numpy.testing import assert_array_equal, assert_equal
  from scipy.optimize._constraints import NonlinearConstraint, Bounds, PreparedConstraint
  from scipy.optimize._trustregion_constr.canonical_constraint import CanonicalConstraint, initial_constraints_as_canonical
label_desc: Use image node_id 7 for calling a global function with example usage: test_initial_constraints_as_canonical_empty() without return types