class_docstr: Interface for heuristics that halt trials early, typically based on early
  results from that trial.
docstr: Perform a series of default checks for a specific trial `trial_index` and
  determines whether it is eligible for further stopping logic:
      1. Check for ignored indices based on `self.trial_indices_to_ignore`
      2. Check that `df` contains data for the trial `trial_index`
      3. Check that the trial has reached `self.min_progression`
      4. Check that the trial hasn't surpassed `self.max_progression`
  Returns two elements: a boolean indicating if all checks are passed and a
  str indicating the reason that early stopping is not applied (None if all
  checks pass).
docstr_tok: ["Perform","a","series","of","default","checks","for","a","specific","trial","`","trial_index","`","and","determines","whether","it","is","eligible","for","further","stopping","logic",":","1",".","Check","for","ignored","indices","based","on","`","self.trial_indices_to_ignore","`","2",".","Check","that","`","df","`","contains","data","for","the","trial","`","trial_index","`","3",".","Check","that","the","trial","has","reached","`","self.min_progression","`","4",".","Check","that","the","trial","has","n't","surpassed","`","self.max_progression","`","Returns","two","elements",":","a","boolean","indicating","if","all","checks","are","passed","and","a","str","indicating","the","reason","that","early","stopping","is","not","applied","(","None","if","all","checks","pass",")","."]
code: def is_eligible(
      self,
      trial_index: int,
      experiment: Experiment,
      df: pd.DataFrame,
      map_key: str,
  ) -> Tuple[bool, Optional[str]]:
      """Perform a series of default checks for a specific trial `trial_index` and
      determines whether it is eligible for further stopping logic:
          1. Check for ignored indices based on `self.trial_indices_to_ignore`
          2. Check that `df` contains data for the trial `trial_index`
          3. Check that the trial has reached `self.min_progression`
          4. Check that the trial hasn't surpassed `self.max_progression`
      Returns two elements: a boolean indicating if all checks are passed and a
      str indicating the reason that early stopping is not applied (None if all
      checks pass)."""
      # check for ignored indices
      if (
          self.trial_indices_to_ignore is not None
          and trial_index in self.trial_indices_to_ignore
      ):
          return self._log_and_return_trial_ignored(
              logger=logger, trial_index=trial_index
          )
  
      # check for no data
      df_trial = df[df["trial_index"] == trial_index].dropna(
          subset=["mean"]
      )
      if df_trial.empty:
          return self._log_and_return_no_data(
              logger=logger, trial_index=trial_index
          )
  
      # check for min/max progression
      trial_last_prog = df_trial[map_key].max()
      logger.info(
          f"Last progression of Trial {trial_index} is {trial_last_prog}."
      )
      if (
          self.min_progression is not None
          and trial_last_prog < self.min_progression
      ):
          return self._log_and_return_progression_range(
              logger=logger,
              trial_index=trial_index,
              trial_last_progression=trial_last_prog,
              min_progression=self.min_progression,
              max_progression=self.max_progression,
          )
      if (
          self.max_progression is not None
          and trial_last_prog > self.max_progression
      ):
          return self._log_and_return_progression_range(
              logger=logger,
              trial_index=trial_index,
              trial_last_progression=trial_last_prog,
              min_progression=self.min_progression,
              max_progression=self.max_progression,
          )
      return True, None
  
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 10 for calling the BaseEarlyStoppingStrategy obj's underlying member method code with example usage: obj.is_eligible(trial_index, experiment, df, map_key) and returns: True,  None, self, self, self, self