code: def test_constrained_function_constraints_setter():
      def c_1(x):
          return x**2
  
      assert c_1(2) == 4
  
      try:
          new_constrained_function = constrained.ConstrainedFunction(
              pointer, constraints=c_1
          )
      except:
          new_constrained_function = constrained.ConstrainedFunction(
              pointer, constraints=[c_1]
          )
  
      assert len(new_constrained_function.constraints) == 1
  
file_path: opytimizer/tests/opytimizer/functions/test_constrained.py
imports: import numpy
  from opytimizer.functions import constrained
  from opytimizer.utils import constant
label_desc: Use image node_id 5 for calling a global function with example usage: test_constrained_function_constraints_setter() and returns: unknown