class_docstr: A model bridge for using torch-based models that fit on MapData. Most
  of the `TorchModelBridge` functionality is retained, except that this
  class should be used in the case where `model` makes use of map_key values.
  For example, the use case of fitting a joint surrogate model on
  `(parameters, map_key)`, while candidate generation is only for `parameters`.
class_docstr_tok: ["A","model","bridge","for","using","torch-based","models","that","fit","on","MapData",".","Most","of","the","`","TorchModelBridge","`","functionality","is","retained",",","except","that","this","class","should","be","used","in","the","case","where","`","model","`","makes","use","of","map_key","values",".","For","example",",","the","use","case","of","fitting","a","joint","surrogate","model","on","`","(","parameters",",","map_key",")","`",",","while","candidate","generation","is","only","for","`","parameters","`","."]
docstr: Convert `target_map_values` to `map_dim_to_target`, a form useable
  by the acquisition function and insert into options dict.
docstr_tok: ["Convert","`","target_map_values","`","to","`","map_dim_to_target","`",",","a","form","useable","by","the","acquisition","function","and","insert","into","options","dict","."]
code: def _add_map_dim_to_target(self, options: TConfig) -> TConfig:
      """Convert `target_map_values` to `map_dim_to_target`, a form useable
      by the acquisition function and insert into options dict.
      """
      target_map_values = self._default_model_gen_options.get(
          "target_map_values"
      )
      if target_map_values is None:
          target_map_values = DEFAULT_TARGET_MAP_VALUES
      param_and_map = self.parameters_with_map_keys
      map_dim_to_target = {
          param_and_map.index(p): target_map_values[
              p
          ]  # pyre-ignore[16]
          for p in self._map_key_features
      }
      options[Keys.ACQF_KWARGS] = {  # pyre-ignore[32]
          **options.get(Keys.ACQF_KWARGS, {}),
          "map_dim_to_target": map_dim_to_target,
      }
      return options
  
imports: from typing import Any, Dict, List, Optional, Tuple, Type
  import numpy
  import torch
  from ax.core.data import Data
  from ax.core.experiment import Experiment
  from ax.core.map_data import MapData
  from ax.core.observation import Observation, ObservationData, ObservationFeatures, observations_from_map_data, separate_observations
  from ax.core.optimization_config import OptimizationConfig
  from ax.core.search_space import SearchSpace
  from ax.core.types import TCandidateMetadata
  from ax.modelbridge.base import GenResults
  from ax.modelbridge.modelbridge_utils import array_to_observation_data, observation_features_to_array, parse_observation_features
  from ax.modelbridge.torch import FIT_MODEL_ERROR, TorchModelBridge
  from ax.modelbridge.transforms.base import Transform
  from ax.models.torch_base import TorchModel
  from ax.models.types import TConfig
  from ax.utils.common.constants import Keys
  from ax.utils.common.typeutils import not_none
label_desc: Use image node_id 12 for calling the MapTorchModelBridge obj's underlying member method code with example usage: obj._add_map_dim_to_target(options) and returns: options