docstr: A Branin map metric with an optional multiplicative factor
  of `1 + exp(-rate * t)` where `t` is the runtime of the trial.
  If the multiplicative factor is used, then at `t = 0`, the function
  is twice the usual value, while as `t` becomes large, the values
  approach the standard Branin values.
  
  Args:
      name: Name of the metric.
      param_names: An ordered list of names of parameters to be passed
          to the deterministic function.
      noise_sd: Scale of normal noise added to the function result.
      lower_is_better: Flag for metrics which should be minimized.
      rate: Parameter of the multiplicative factor.
docstr_tok: ["A","Branin","map","metric","with","an","optional","multiplicative","factor","of","`","1","+","exp","(","-rate","*","t",")","`","where","`","t","`","is","the","runtime","of","the","trial",".","If","the","multiplicative","factor","is","used",",","then","at","`","t","=","0","`",",","the","function","is","twice","the","usual","value",",","while","as","`","t","`","becomes","large",",","the","values","approach","the","standard","Branin","values",".","Args",":","name",":","Name","of","the","metric",".","param_names",":","An","ordered","list","of","names","of","parameters","to","be","passed","to","the","deterministic","function",".","noise_sd",":","Scale","of","normal","noise","added","to","the","function","result",".","lower_is_better",":","Flag","for","metrics","which","should","be","minimized",".","rate",":","Parameter","of","the","multiplicative","factor","."]
code: def __init__(
      self,
      name: str,
      param_names: Iterable[str],
      noise_sd: float = 0.0,
      lower_is_better: Optional[bool] = None,
      rate: Optional[float] = None,
      cache_evaluations: bool = True,
  ) -> None:
      """A Branin map metric with an optional multiplicative factor
      of `1 + exp(-rate * t)` where `t` is the runtime of the trial.
      If the multiplicative factor is used, then at `t = 0`, the function
      is twice the usual value, while as `t` becomes large, the values
      approach the standard Branin values.
  
      Args:
          name: Name of the metric.
          param_names: An ordered list of names of parameters to be passed
              to the deterministic function.
          noise_sd: Scale of normal noise added to the function result.
          lower_is_better: Flag for metrics which should be minimized.
          rate: Parameter of the multiplicative factor.
      """
      self.rate = rate
      # pyre-fixme[4]: Attribute must be annotated.
      self._trial_index_to_timestamp = defaultdict(int)
  
      super().__init__(
          name=name,
          param_names=param_names,
          noise_sd=noise_sd,
          lower_is_better=lower_is_better,
          cache_evaluations=cache_evaluations,
      )
  
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 1 to create a new BraninTimestampMapMetric object from inherited base classes: NoisyFunctionMapMetric with example: obj = BraninTimestampMapMetric(name, param_names, noise_sd, lower_is_better, rate, cache_evaluations)