class_docstr: Base InputProcessor class.
class_docstr_tok: ["Base","InputProcessor","class","."]
docstr: Resolves Span and Version information.
  
  If a pattern has the {SPAN} placeholder or the Date spec placeholders,
  {YYYY}, {MM}, and {DD}, and optionally, the {VERSION} placeholder, attempts
  to find aligned values that results in all splits having the target span and
  most recent version for that span.
  
  Returns:
    A Tuple of [target_span, target_version], where:
    1. target_span is either the value matched with the {SPAN} placeholder,
       the value mapped from matching the calendar date with the date
       placeholders {YYYY}, {MM}, {DD} or 0 if a placeholder wasn't specified.
    2. target_version is either the value matched with the {VERSION}
       placeholder, or None if the placeholder wasn't specified.
docstr_tok: ["Resolves","Span","and","Version","information",".","If","a","pattern","has","the","{","SPAN","}","placeholder","or","the","Date","spec","placeholders",",","{","YYYY","}",",","{","MM","}",",","and","{","DD","}",",","and","optionally",",","the","{","VERSION","}","placeholder",",","attempts","to","find","aligned","values","that","results","in","all","splits","having","the","target","span","and","most","recent","version","for","that","span",".","Returns",":","A","Tuple","of","[","target_span",",","target_version","]",",","where",":","1.","target_span","is","either","the","value","matched","with","the","{","SPAN","}","placeholder",",","the","value","mapped","from","matching","the","calendar","date","with","the","date","placeholders","{","YYYY","}",",","{","MM","}",",","{","DD","}","or","0","if","a","placeholder","was","n't","specified",".","2.","target_version","is","either","the","value","matched","with","the","{","VERSION","}","placeholder",",","or","None","if","the","placeholder","was","n't","specified","."]
code: def resolve_span_and_version(self) -> Tuple[int, Optional[int]]:
      """Resolves Span and Version information.
  
      If a pattern has the {SPAN} placeholder or the Date spec placeholders,
      {YYYY}, {MM}, and {DD}, and optionally, the {VERSION} placeholder, attempts
      to find aligned values that results in all splits having the target span and
      most recent version for that span.
  
      Returns:
        A Tuple of [target_span, target_version], where:
        1. target_span is either the value matched with the {SPAN} placeholder,
           the value mapped from matching the calendar date with the date
           placeholders {YYYY}, {MM}, {DD} or 0 if a placeholder wasn't specified.
        2. target_version is either the value matched with the {VERSION}
           placeholder, or None if the placeholder wasn't specified.
      """
      target_span = 0
      target_version = None
  
      if self._range_config:
          if self._range_config.HasField("static_range"):
              target_span = (
                  self._range_config.static_range.start_span_number
              )
          elif self._range_config.HasField("rolling_range"):
              target_span = self.get_latest_span()
  
      # TODO(b/162622803): add default behavior for when version spec not present.
      target_version = self.get_latest_version(
          target_span
      )  # pylint: disable=assignment-from-none
  
      return target_span, target_version
  
imports: import abc
  import copy
  from typing import Iterable, Optional, Tuple
  from tfx.components.example_gen import utils
  from tfx.proto import example_gen_pb2
  from tfx.proto import range_config_pb2
label_desc: Use image node_id 2 for calling the InputProcessor obj's underlying member method code with example usage: obj.resolve_span_and_version() and returns: target_span,  target_version