code: def FormatArtifacts(self, artifacts):
      
      # TODO: improve output formatting of yaml
      artifact_definitions = [artifact.AsDict() for artifact in artifacts]
      yaml_data = yaml.safe_dump_all(artifact_definitions)
      return yaml_data
docs: Formats artifacts to desired output format.
  
      Args:
        artifacts (list[ArtifactDefinition]): artifact definitions.
  
      Returns:
        str: formatted string of artifact definition.