class_docstr: Sample resolver operator.
code: def _select_latest_spans(
      self, examples: Sequence[tfx.types.Artifact]
  ):
      examples_by_span = {e.span: e for e in examples}
      latest_spans = sorted(examples_by_span)[-self.n :]
      return [examples_by_span[span] for span in latest_spans]
  
file_path: tfx/tfx/dsl/compiler/testdata/resolver_function_pipeline.py
imports: from typing import Sequence
  from tfx.components import CsvExampleGen
  from tfx.components import Trainer
  from tfx.dsl.input_resolution import resolver_function
  from tfx.dsl.input_resolution import resolver_op
  from tfx.orchestration import pipeline
  from tfx.proto import trainer_pb2
  import tfx.types
  from tfx.utils import typing_utils
label_desc: Use image node_id 1 for calling the LatestSpans obj's underlying member method code with example usage: obj._select_latest_spans(examples) and returns: unknown