code: def _branin_evaluation_function(
      parameterization,
      weight=None,  # pyre-fixme[2]: Parameter must be annotated.
  ) -> Dict[str, Tuple[Union[float, ndarray], float]]:
      if any(
          param_name not in parameterization.keys()
          for param_name in ["x1", "x2"]
      ):
          raise ValueError("Parametrization does not contain x1 or x2")
      x1, x2 = parameterization["x1"], parameterization["x2"]
      return {
          "branin": (branin(x1, x2), 0.0),
          "constrained_metric": (-branin(x1, x2), 0.0),
      }
  
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 1 for calling a global function with example usage: _branin_evaluation_function(parameterization, weight) and returns: dict