class_docstr: Check functionality of optimization loop.
docstr: Tests optimization as a single call.
docstr_tok: ["Tests","optimization","as","a","single","call","."]
code: def test_optimize_unknown_sem(self) -> None:
      """Tests optimization as a single call."""
      best, vals, exp, model = optimize(
          parameters=[
              {"name": "x1", "type": "range", "bounds": [-10.0, 10.0]},
              {"name": "x2", "type": "range", "bounds": [-10.0, 10.0]},
          ],
          # Booth function.
          evaluation_function=lambda p: (
              (p["x1"] + 2 * p["x2"] - 7) ** 2
              + (2 * p["x1"] + p["x2"] - 5) ** 2,
              None,
          ),
          minimize=True,
          total_trials=6,
      )
      self.assertIn("x1", best)
      self.assertIn("x2", best)
      self.assertIsNotNone(vals)
      self.assertIn("objective", vals[0])
      # pyre-fixme[6]: For 2nd param expected `Union[Container[typing.Any],
      #  Iterable[typing.Any]]` but got `Optional[Dict[str, Dict[str, float]]]`.
      self.assertIn("objective", vals[1])
      # pyre-fixme[16]: Optional type has no attribute `__getitem__`.
      self.assertIn("objective", vals[1]["objective"])
  
imports: from typing import Dict, Tuple, Union
  from unittest.mock import Mock, patch
  import numpy
  from ax.exceptions.core import UserInputError
  from ax.metrics.branin import branin
  from ax.modelbridge.generation_strategy import GenerationStep, GenerationStrategy
  from ax.modelbridge.registry import Models
  from ax.service.managed_loop import OptimizationLoop, optimize
  from ax.utils.common.testutils import TestCase
  from ax.utils.testing.mock import fast_botorch_optimize
  from numpy import ndarray
label_desc: Use image node_id 9 for calling the TestManagedLoop obj's underlying member method code with example usage: obj.test_optimize_unknown_sem() without return types