class_docstr: Base InputProcessor class.
class_docstr_tok: ["Base","InputProcessor","class","."]
docstr: Initialize InputProcessor.
  
  Args:
    splits: An iterable collection of example_gen_pb2.Input.Split objects.
    range_config: An instance of range_config_pb2.RangeConfig, defines the
      rules for span resolving.
docstr_tok: ["Initialize","InputProcessor",".","Args",":","splits",":","An","iterable","collection","of","example_gen_pb2.Input.Split","objects",".","range_config",":","An","instance","of","range_config_pb2.RangeConfig",",","defines","the","rules","for","span","resolving","."]
code: def __init__(
      self,
      splits: Iterable[example_gen_pb2.Input.Split],
      range_config: Optional[range_config_pb2.RangeConfig] = None,
  ):
      """Initialize InputProcessor.
  
      Args:
        splits: An iterable collection of example_gen_pb2.Input.Split objects.
        range_config: An instance of range_config_pb2.RangeConfig, defines the
          rules for span resolving.
      """
      self._splits = splits
  
      if range_config:
          if range_config.HasField("static_range"):
              start_span_number = (
                  range_config.static_range.start_span_number
              )
              end_span_number = (
                  range_config.static_range.end_span_number
              )
              if start_span_number != end_span_number:
                  raise ValueError(
                      "For ExampleGen, start and end span numbers for RangeConfig.StaticRange must be equal."
                  )
          elif range_config.HasField("rolling_range"):
              if range_config.rolling_range.num_spans != 1:
                  raise ValueError(
                      "ExampleGen only support single span for RangeConfig.RollingRange."
                  )
              if range_config.rolling_range.start_span_number > 0:
                  raise ValueError(
                      "RangeConfig.rolling_range.start_span_number is not supported."
                  )
          else:
              raise ValueError(
                  "Only static_range and rolling_range are supported."
              )
  
      self._range_config = range_config
  
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 1 to create a new InputProcessor object from inherited base classes: abc with example: obj = InputProcessor(splits, range_config)