code: def _generate_output_uri(
      base_output_dir: str,
      name: str,
      execution_id: int,
      is_single_artifact: bool = True,
      index: int = 0,
  ) -> str:
      """Generate uri for output artifact."""
      if is_single_artifact:
          # TODO(b/145680633): Consider differentiating different types of uris.
          return os.path.join(base_output_dir, name, str(execution_id))
  
      return os.path.join(
          base_output_dir, name, str(execution_id), str(index)
      )
  
file_path: tfx/tfx/dsl/components/base/base_driver.py
imports: import os
  from typing import Any, Dict, List
  import absl
  from tfx import types
  from tfx.dsl.io import fileio
  from tfx.orchestration import data_types
  from tfx.orchestration import metadata
  from tfx.types import artifact_utils
  from tfx.types import channel_utils
label_desc: Use image node_id 1 for calling a global function with example usage: _generate_output_uri(base_output_dir, name, execution_id, is_single_artifact, index) and returns: os, os