code: def testPrepareOutputArtifacts(self):
      examples = standard_artifacts.Examples()
      output_dict = {
          standard_component_specs.EXAMPLES_KEY: channel_utils.as_channel(
              [examples]
          )
      }
      exec_properties = {
          utils.SPAN_PROPERTY_NAME: 2,
          utils.VERSION_PROPERTY_NAME: 1,
          utils.FINGERPRINT_PROPERTY_NAME: "fp",
      }
  
      pipeline_info = data_types.PipelineInfo(
          pipeline_name="name",
          pipeline_root=self._test_dir,
          run_id="rid",
      )
      component_info = data_types.ComponentInfo(
          component_type="type",
          component_id="cid",
          pipeline_info=pipeline_info,
      )
  
      input_artifacts = {}
      output_artifacts = self._file_based_driver._prepare_output_artifacts(  # pylint: disable=protected-access
          input_artifacts,
          output_dict,
          exec_properties,
          1,
          pipeline_info,
          component_info,
      )
      examples = artifact_utils.get_single_instance(
          output_artifacts[standard_component_specs.EXAMPLES_KEY]
      )
      base_output_dir = os.path.join(
          self._test_dir, component_info.component_id
      )
      expected_uri = base_driver._generate_output_uri(  # pylint: disable=protected-access
          base_output_dir, "examples", 1
      )
  
      self.assertEqual(examples.uri, expected_uri)
      self.assertEqual(
          examples.get_string_custom_property(
              utils.FINGERPRINT_PROPERTY_NAME
          ),
          "fp",
      )
      self.assertEqual(
          examples.get_int_custom_property(utils.SPAN_PROPERTY_NAME), 2
      )
      self.assertEqual(
          examples.get_int_custom_property(utils.VERSION_PROPERTY_NAME),
          1,
      )
  
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 5 for calling the DriverTest obj's underlying member method code with example usage: obj.testPrepareOutputArtifacts() without return types