class_docstr: SpanDrivenEvaluatorInputs operator.
class_docstr_tok: ["SpanDrivenEvaluatorInputs","operator","."]
docstr: Finds the latest Model not trained on Examples with span max_span.
docstr_tok: ["Finds","the","latest","Model","not","trained","on","Examples","with","span","max_span","."]
code: def _get_model_to_evaluate(
      self,
      trained_examples_by_model: Dict[
          types.Artifact, List[types.Artifact]
      ],
      max_span: int,
  ) -> Optional[types.Artifact]:
      """Finds the latest Model not trained on Examples with span max_span."""
      # Recall that the trained_examples_by_model keys are already sorted from
      # latest created to oldest created.
      for model, trained_examples in trained_examples_by_model.items():
          # If no examples were returned (e.g. they were garbage collected), then
          # continue searching.
          if not trained_examples:
              continue
  
          if trained_examples[-1].span < max_span:
              # The first Model was trained on spans less than max_span.
              return model
  
      # No eligible Model was found, so a SkipSignal is raised.
      raise exceptions.SkipSignal()
  
file_path: tfx/tfx/dsl/input_resolution/ops/span_driven_evaluator_inputs_op.py
imports: from typing import Dict, List, Optional
  from tfx import types
  from tfx.dsl.input_resolution import resolver_op
  from tfx.dsl.input_resolution.ops import ops_utils
  from tfx.dsl.input_resolution.ops import training_range_op
  from tfx.orchestration.portable.input_resolution import exceptions
  from tfx.utils import typing_utils
label_desc: Use image node_id 1 for calling the SpanDrivenEvaluatorInputs obj's underlying member method code with example usage: obj._get_model_to_evaluate(trained_examples_by_model, max_span) and returns: model