code: def test_concrete_model_example() -> None:
      # DOC_CONCRETE_0
      import pyomo.environ as pyomo
  
      def square(m):
          return pyomo.quicksum((m.x[i] - 0.5) ** 2 for i in m.x)
  
      model = pyomo.ConcreteModel()
      model.x = pyomo.Var([0, 1], domain=pyomo.Reals)
      model.obj = pyomo.Objective(rule=square)
      model.Constraint1 = pyomo.Constraint(rule=lambda m: m.x[0] >= 1)
      model.Constraint2 = pyomo.Constraint(rule=lambda m: m.x[1] >= 0.8)
      # DOC_CONCRETE_1
  
      # DOC_CONCRETE_10
      import nevergrad as ng
      import nevergrad.functions.pyomo as ng_pyomo
  
      # DOC_CONCRETE_11
  
      # DOC_CONCRETE_100
      func = ng_pyomo.Pyomo(model)
      optimizer = ng.optimizers.OnePlusOne(
          parametrization=func.parametrization, budget=100
      )
      recommendation = optimizer.minimize(func.function)
      # DOC_CONCRETE_101
  
      # DOC_CONCRETE_1000
      print(recommendation.kwargs["x[0]"])
      print(recommendation.kwargs["x[1]"])
      # DOC_CONCRETE_1001
  
      np.testing.assert_almost_equal(
          recommendation.kwargs["x[0]"], 1.0, decimal=1
      )
      np.testing.assert_almost_equal(
          recommendation.kwargs["x[1]"], 0.8, decimal=1
      )
  
imports: from pathlib import Path
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: test_concrete_model_example() and returns: pyomo