code: def test_hyperopt_helpers(parametrization, values):
      for val, dict_val, hyperopt_val in values:
          parametrization.value = val
          assert flatten(
              _hp_parametrization_to_dict(parametrization)
          ) == pytest.approx(flatten(dict_val))
          assert flatten(
              _hp_dict_to_parametrization(hyperopt_val)
          ) == pytest.approx(flatten(parametrization.value))
  
file_path: nevergrad/nevergrad/optimization/test_externalbo.py
imports: import pytest
  import numpy
  import nevergrad
  from nevergrad.common.tools import flatten
  from .optimizerlib import registry
  from .externalbo import _hp_parametrization_to_dict, _hp_dict_to_parametrization
label_desc: Use image node_id 2 for calling a global function with example usage: test_hyperopt_helpers(parametrization, values) without return types