class_docstr: A base class for model based early stopping strategies. Includes
  a helper function for processing MapData into arrays.
docstr: Validity checks and returns the `MapData` used for early stopping that
  is associated with `metric_names`. This function also handles normalizing
  progressions.
docstr_tok: ["Validity","checks","and","returns","the","`","MapData","`","used","for","early","stopping","that","is","associated","with","`","metric_names","`",".","This","function","also","handles","normalizing","progressions","."]
code: def _check_validity_and_get_data(
      self, experiment: Experiment, metric_names: List[str]
  ) -> Optional[MapData]:
      """Validity checks and returns the `MapData` used for early stopping that
      is associated with `metric_names`. This function also handles normalizing
      progressions.
      """
      map_data = super()._check_validity_and_get_data(
          experiment=experiment, metric_names=metric_names
      )
      if (
          map_data is not None
          and self.min_progression_modeling is not None
      ):
          map_df = map_data.map_df
          map_df = map_df[
              map_df[map_data.map_keys[0]]
              >= self.min_progression_modeling
          ]
          map_data = MapData(
              df=map_df,
              map_key_infos=map_data.map_key_infos,
              description=map_data.description,
          )
      return map_data
  
imports: import logging
  from abc import ABC, abstractmethod
  from dataclasses import dataclass
  from logging import Logger
  from typing import Any, Dict, Iterable, List, Optional, Sequence, Set, Tuple, Type
  import numpy
  import pandas
  from ax.core.base_trial import TrialStatus
  from ax.core.data import Data
  from ax.core.experiment import Experiment
  from ax.core.map_data import MapData
  from ax.core.objective import MultiObjective
  from ax.modelbridge.map_torch import MapTorchModelBridge
  from ax.modelbridge.modelbridge_utils import _unpack_observations, observation_data_to_array, observation_features_to_array
  from ax.modelbridge.registry import Cont_X_trans, Y_trans
  from ax.modelbridge.transforms.base import Transform
  from ax.modelbridge.transforms.map_unit_x import MapUnitX
  from ax.models.torch_base import TorchModel
  from ax.utils.common.base import Base
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import checked_cast, not_none
label_desc: Use image node_id 2 for calling the ModelBasedEarlyStoppingStrategy obj's underlying member method code with example usage: obj._check_validity_and_get_data(experiment, metric_names) and returns: map_data