class_docstr: GenerationStrategy describes which model should be used to generate new
  points for which trials, enabling and automating use of different models
  throughout the optimization process. For instance, it allows to use one
  model for the initialization trials, and another one for all subsequent
  trials. In the general case, this allows to automate use of an arbitrary
  number of models to generate an arbitrary numbers of trials
  described in the `trials_per_model` argument.
  
  Args:
      nodes: A list of `GenerationNode`. Each `GenerationNode` in the list
          represents a single node in a `GenerationStrategy` which, when
          composed of `GenerationNodes`, can be conceptualized as a graph instead
          of a linear list. `TransitionCriterion` defined in each `GenerationNode`
          represent the edges in the `GenerationStrategy` graph. `GenerationNodes`
          are more flexible than `GenerationSteps` and new `GenerationStrategies`
          should use nodes. Notably, either, but not both, of `nodes` and `steps`
          must be provided.
      steps: A list of `GenerationStep` describing steps of this strategy.
      name: An optional name for this generaiton strategy. If not specified,
          strategy's name will be names of its nodes' models joined with '+'.
docstr: First check if we can move the generation strategy to the next node, which
  is safe, as the next call to ``gen`` will just pick up from there. Then
  determine how many generator runs this generation strategy can generate right
  now, assuming each one of them becomes its own trial, and whether optimization
  is completed.
  
  Returns: a two-item tuple of:
        - the number of generator runs that can currently be produced, with -1
          meaning unlimited generator runs,
        - whether optimization is completed and the generation strategy cannot
          generate any more generator runs at all.
docstr_tok: ["First","check","if","we","can","move","the","generation","strategy","to","the","next","node",",","which","is","safe",",","as","the","next","call","to","``","gen","``","will","just","pick","up","from","there",".","Then","determine","how","many","generator","runs","this","generation","strategy","can","generate","right","now",",","assuming","each","one","of","them","becomes","its","own","trial",",","and","whether","optimization","is","completed",".","Returns",":","a","two-item","tuple","of",":","-","the","number","of","generator","runs","that","can","currently","be","produced",",","with","-1","meaning","unlimited","generator","runs",",","-","whether","optimization","is","completed","and","the","generation","strategy","can","not","generate","any","more","generator","runs","at","all","."]
code: def current_generator_run_limit(
      self,
  ) -> Tuple[int, bool]:
      """First check if we can move the generation strategy to the next node, which
      is safe, as the next call to ``gen`` will just pick up from there. Then
      determine how many generator runs this generation strategy can generate right
      now, assuming each one of them becomes its own trial, and whether optimization
      is completed.
  
      Returns: a two-item tuple of:
            - the number of generator runs that can currently be produced, with -1
              meaning unlimited generator runs,
            - whether optimization is completed and the generation strategy cannot
              generate any more generator runs at all.
      """
      try:
          self._maybe_move_to_next_step(raise_data_required_error=False)
      except GenerationStrategyCompleted:
          return 0, True
  
      # if the generation strategy is not complete, optimization is not complete
      return self._curr.generator_run_limit(), False
  
imports: from __future__ import annotations
  from copy import deepcopy
  from functools import wraps
  from logging import Logger
  from typing import Any, Callable, Dict, List, Optional, Tuple, TypeVar
  import pandas
  from ax.core.data import Data
  from ax.core.experiment import Experiment
  from ax.core.generation_strategy_interface import GenerationStrategyInterface
  from ax.core.generator_run import GeneratorRun
  from ax.core.observation import ObservationFeatures
  from ax.core.utils import extend_pending_observations, get_pending_observation_features_based_on_trial_status
  from ax.exceptions.core import DataRequiredError, UnsupportedError, UserInputError
  from ax.exceptions.generation_strategy import GenerationStrategyCompleted, GenerationStrategyMisconfiguredException
  from ax.modelbridge.base import ModelBridge
  from ax.modelbridge.generation_node import GenerationNode, GenerationStep
  from ax.modelbridge.model_spec import FactoryFunctionModelSpec
  from ax.modelbridge.registry import _extract_model_state_after_gen, ModelRegistryBase
  from ax.modelbridge.transition_criterion import TrialBasedCriterion
  from ax.utils.common.logger import _round_floats_for_logging, get_logger
  from ax.utils.common.typeutils import checked_cast, not_none
label_desc: Use image node_id 21 for calling the GenerationStrategy obj's underlying member method code with example usage: obj.current_generator_run_limit() and returns: self,  False, int,  True