code: def testQueryBasedDriver(self):
      # Create exec proterties.
      exec_properties = {
          standard_component_specs.INPUT_CONFIG_KEY: proto_utils.proto_to_json(
              example_gen_pb2.Input(
                  splits=[
                      example_gen_pb2.Input.Split(
                          name="s1",
                          pattern="select * from table where date=@span_yyyymmdd_utc",
                      ),
                      example_gen_pb2.Input.Split(
                          name="s2",
                          pattern="select * from table2 where date=@span_yyyymmdd_utc",
                      ),
                  ]
              )
          ),
          standard_component_specs.RANGE_CONFIG_KEY: proto_utils.proto_to_json(
              range_config_pb2.RangeConfig(
                  static_range=range_config_pb2.StaticRange(
                      start_span_number=2, end_span_number=2
                  )
              )
          ),
      }
      # Prepare output_dict
      example = standard_artifacts.Examples()
      example.uri = "my_uri"
      output_dict = {standard_component_specs.EXAMPLES_KEY: [example]}
  
      query_based_driver = driver.QueryBasedDriver(self._mock_metadata)
      result = query_based_driver.run(
          portable_data_types.ExecutionInfo(
              output_dict=output_dict, exec_properties=exec_properties
          )
      )
  
      self.assertEqual(exec_properties[utils.SPAN_PROPERTY_NAME], 2)
      self.assertIsNone(exec_properties[utils.VERSION_PROPERTY_NAME])
      self.assertIsNone(
          exec_properties[utils.FINGERPRINT_PROPERTY_NAME]
      )
      updated_input_config = example_gen_pb2.Input()
      proto_utils.json_to_proto(
          exec_properties[standard_component_specs.INPUT_CONFIG_KEY],
          updated_input_config,
      )
      self.assertProtoEquals(
          """
          splits {
            name: "s1"
            pattern: "select * from table where date='19700103'"
          }
          splits {
            name: "s2"
            pattern: "select * from table2 where date='19700103'"
          }""",
          updated_input_config,
      )
      self.assertLen(
          result.output_artifacts[
              standard_component_specs.EXAMPLES_KEY
          ].artifacts,
          1,
      )
      output_example = result.output_artifacts[
          standard_component_specs.EXAMPLES_KEY
      ].artifacts[0]
      self.assertEqual(output_example.uri, example.uri)
      self.assertEqual(
          output_example.custom_properties[
              utils.SPAN_PROPERTY_NAME
          ].int_value,
          2,
      )
  
imports: import os
  import tensorflow
  from tfx.components.example_gen import driver
  from tfx.components.example_gen import utils
  from tfx.dsl.components.base import base_driver
  from tfx.dsl.io import fileio
  from tfx.orchestration import data_types
  from tfx.orchestration.portable import data_types
  from tfx.proto import example_gen_pb2
  from tfx.proto import range_config_pb2
  from tfx.types import artifact
  from tfx.types import artifact_utils
  from tfx.types import channel_utils
  from tfx.types import standard_artifacts
  from tfx.types import standard_component_specs
  from tfx.utils import io_utils
  from tfx.utils import proto_utils
label_desc: Use image node_id 7 for calling the DriverTest obj's underlying member method code with example usage: obj.testQueryBasedDriver() without return types