code: def replicate_artifacts(
      source: Artifact, count: int
  ) -> List[Artifact]:
      """Replicate given artifact and return a list with `count` artifacts."""
      result = []
      artifact_cls = source.type
      for i in range(count):
          new_instance = artifact_cls()
          new_instance.copy_from(source)
          # New uris should be sub directories of the original uri. See
          # https://github.com/tensorflow/tfx/blob/1a1a53e17626d636f403b6dd16f8635e80755682/tfx/orchestration/portable/execution_publish_utils.py#L35
          new_instance.uri = os.path.join(source.uri, str(i))
          result.append(new_instance)
      return result
  
file_path: tfx/tfx/types/artifact_utils.py
imports: import itertools
  import json
  import os
  from typing import Dict, List, Optional, Type, Union
  from absl import logging
  from tfx.dsl.io import fileio
  from tfx.types import artifact
  from tfx.types import standard_artifact_utils
  from tfx.types import value_artifact
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 5 for calling a global function with example usage: replicate_artifacts(source, count) and returns: result