code: def test_concrete_model_without_constraints() -> None:
      model = pyomo.ConcreteModel()
      model.x = pyomo.Var([1, 2], domain=pyomo.NonNegativeReals)
      model.obj = pyomo.Objective(
          expr=(model.x[1] - 0.5) ** 2 + (model.x[2] - 0.5) ** 2
      )
  
      func = core.Pyomo(model)
      optimizer = ng.optimizers.NGO(
          parametrization=func.parametrization, budget=100
      )
      recommendation = optimizer.minimize(func.function)
  
      np.testing.assert_almost_equal(
          recommendation.kwargs["x[1]"], 0.5, decimal=1
      )
      np.testing.assert_almost_equal(
          recommendation.kwargs["x[2]"], 0.5, 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 1 for calling a global function with example usage: test_concrete_model_without_constraints() without return types