code: def FormatArtifacts(self, artifacts):
      
      artifact_definitions = [artifact.AsDict() for artifact in artifacts]
      json_data = json.dumps(artifact_definitions)
      return json_data
docs: Formats artifacts to desired output format.
  
      Args:
        artifacts (list[ArtifactDefinition]): artifact definitions.
  
      Returns:
        str: formatted string of artifact definition.