code: def testFileBasedInputProcessor(self):
      # TODO(b/181275944): migrate test after refactoring FileBasedInputProcessor.
  
      input_config = example_gen_pb2.Input(
          splits=[
              example_gen_pb2.Input.Split(
                  name="s1", pattern="path/{SPAN}"
              ),
              example_gen_pb2.Input.Split(name="s2", pattern="path2"),
          ]
      )
      input_config2 = example_gen_pb2.Input(
          splits=[
              example_gen_pb2.Input.Split(name="s", pattern="path"),
          ]
      )
  
      static_range_config = range_config_pb2.RangeConfig(
          static_range=range_config_pb2.StaticRange(
              start_span_number=2, end_span_number=2
          )
      )
  
      with self.assertRaisesRegex(
          ValueError, "Spec setup should the same for all splits"
      ):
          input_processor.FileBasedInputProcessor(
              "input_base_uri", input_config.splits, None
          )
  
      with self.assertRaisesRegex(
          ValueError, "Span or Date spec should be specified"
      ):
          input_processor.FileBasedInputProcessor(
              "input_base_uri",
              input_config2.splits,
              static_range_config,
          )
  
file_path: tfx/tfx/components/example_gen/input_processor_test.py
imports: from typing import Optional
  import tensorflow
  from tfx.components.example_gen import input_processor
  from tfx.proto import example_gen_pb2
  from tfx.proto import range_config_pb2
label_desc: Use image node_id 2 for calling the InputProcessorTest obj's underlying member method code with example usage: obj.testFileBasedInputProcessor() without return types