code: def test_concrete_model_with_constraints() -> None:
      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)
  
      func = core.Pyomo(model)
      optimizer = ng.optimizers.OnePlusOne(
          parametrization=func.parametrization, budget=100
      )
      recommendation = optimizer.minimize(func.function)
  
      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
      )
  
file_path: nevergrad/nevergrad/functions/pyomo/test_core.py
imports: import typing
  import os
  import numpy
  import pyomo.environ
  import nevergrad
  from .None import core
label_desc: Use image node_id 3 for calling a global function with example usage: test_concrete_model_with_constraints() without return types