code: def test_is_eligible(self) -> None:
      class FakeStrategy(BaseEarlyStoppingStrategy):
          def should_stop_trials_early(
              self,
              trial_indices: Set[int],
              experiment: Experiment,
              **kwargs: Dict[str, Any],
          ) -> Dict[int, Optional[str]]:
              return {}
  
      experiment = get_test_map_data_experiment(
          num_trials=3, num_fetches=5, num_complete=3
      )
      es_strategy = FakeStrategy(min_progression=3, max_progression=5)
      map_data = es_strategy._check_validity_and_get_data(
          experiment,
          metric_names=[
              es_strategy._default_objective_and_direction(
                  experiment=experiment
              )[0]
          ],
      )
      map_data = checked_cast(MapData, map_data)
      self.assertTrue(
          es_strategy.is_eligible(
              trial_index=0,
              experiment=experiment,
              df=map_data.map_df,
              map_key=map_data.map_keys[0],
          )[0]
      )
  
      es_strategy = FakeStrategy(min_progression=5)
      self.assertFalse(
          es_strategy.is_eligible(
              trial_index=0,
              experiment=experiment,
              df=map_data.map_df,
              map_key=map_data.map_keys[0],
          )[0]
      )
  
      es_strategy = FakeStrategy(min_progression=2, max_progression=3)
      self.assertFalse(
          es_strategy.is_eligible(
              trial_index=0,
              experiment=experiment,
              df=map_data.map_df,
              map_key=map_data.map_keys[0],
          )[0]
      )
  
imports: from typing import Any, Dict, Optional, Set
  import numpy
  import pandas
  from ax.core.base_trial import TrialStatus
  from ax.core.experiment import Experiment
  from ax.core.map_data import MapData
  from ax.early_stopping.strategies import BaseEarlyStoppingStrategy, ModelBasedEarlyStoppingStrategy, PercentileEarlyStoppingStrategy, ThresholdEarlyStoppingStrategy
  from ax.early_stopping.strategies.logical import AndEarlyStoppingStrategy, OrEarlyStoppingStrategy
  from ax.early_stopping.utils import align_partial_results
  from ax.exceptions.core import UnsupportedError
  from ax.utils.common.testutils import TestCase
  from ax.utils.common.typeutils import checked_cast
  from ax.utils.testing.core_stubs import get_branin_arms, get_branin_experiment, get_branin_experiment_with_timestamp_map_metric, get_experiment_with_multi_objective, get_test_map_data_experiment
  from pyre_extensions import none_throws
label_desc: Use image node_id 3 for calling the TestBaseEarlyStoppingStrategy obj's underlying member method code with example usage: obj.test_is_eligible() and returns: dict