code: def f(self, x: np.ndarray) -> Mapping[str, Any]:
      if self.index < len(FIDELITY):
          self.index += 1
  
      x1, x2 = x
      fidelity = FIDELITY[self.index]
  
      fidelity_penalty = random() * math.pow(1.0 - fidelity, 2.0)
      mean = (
          checked_cast(float, branin(x1=x1, x2=x2)) - fidelity_penalty
      )
  
      return {"mean": mean, "fidelity": fidelity}
  
imports: from __future__ import annotations
  import math
  from collections import defaultdict
  from random import random
  from typing import Any, Iterable, Mapping, Optional
  import numpy
  import pandas
  from ax.core.base_trial import BaseTrial
  from ax.core.map_data import MapData, MapKeyInfo
  from ax.core.map_metric import MapMetricFetchResult
  from ax.core.metric import MetricFetchE
  from ax.metrics.noisy_function_map import NoisyFunctionMapMetric
  from ax.utils.common.result import Err, Ok
  from ax.utils.common.typeutils import checked_cast, not_none
  from ax.utils.measurement.synthetic_functions import branin
label_desc: Use image node_id 3 for calling the BraninFidelityMapMetric obj's underlying member method code with example usage: obj.f(x) and returns: dict