class_docstr: Custom driver for ExampleGen.
class_docstr_tok: ["Custom","driver","for","ExampleGen","."]
docstr: Overrides BaseDriver._prepare_output_artifacts().
docstr_tok: ["Overrides","BaseDriver._prepare_output_artifacts","(",")","."]
code: def _prepare_output_artifacts(
      self,
      input_artifacts: Dict[str, List[types.Artifact]],
      output_dict: Dict[str, types.Channel],
      exec_properties: Dict[str, Any],
      execution_id: int,
      pipeline_info: data_types.PipelineInfo,
      component_info: data_types.ComponentInfo,
  ) -> Dict[str, List[types.Artifact]]:
      """Overrides BaseDriver._prepare_output_artifacts()."""
      del input_artifacts
  
      example_artifact = output_dict[
          standard_component_specs.EXAMPLES_KEY
      ].type()
      base_output_dir = os.path.join(
          pipeline_info.pipeline_root, component_info.component_id
      )
  
      example_artifact.uri = base_driver._generate_output_uri(  # pylint: disable=protected-access
          base_output_dir,
          standard_component_specs.EXAMPLES_KEY,
          execution_id,
      )
      update_output_artifact(
          exec_properties, example_artifact.mlmd_artifact
      )
      base_driver._prepare_output_paths(
          example_artifact
      )  # pylint: disable=protected-access
  
      return {standard_component_specs.EXAMPLES_KEY: [example_artifact]}
  
imports: import copy
  import os
  from typing import Any, Dict, List, Iterable, Optional
  from absl import logging
  from tfx import types
  from tfx.components.example_gen import input_processor
  from tfx.components.example_gen import utils
  from tfx.dsl.components.base import base_driver
  from tfx.orchestration import data_types
  from tfx.orchestration import data_types_utils
  from tfx.orchestration import metadata
  from tfx.orchestration.portable import base_driver
  from tfx.orchestration.portable import data_types
  from tfx.proto import example_gen_pb2
  from tfx.proto import range_config_pb2
  from tfx.proto.orchestration import driver_output_pb2
  from tfx.types import standard_component_specs
  from tfx.utils import proto_utils
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 4 for calling the Driver obj's underlying member method code with example usage: obj._prepare_output_artifacts(input_artifacts, output_dict, exec_properties, execution_id, pipeline_info, component_info) and returns: dict