class_docstr: A helper class to manage Lineage Artifacts
class_docstr_tok: ["A","helper","class","to","manage","Lineage","Artifacts"]
docstr: Create the artifact by calling `CreateArtifact` API
  
  Args:
      sagemaker_session (sagemaker.session.Session): Session object which
          manages interactions with Amazon SageMaker APIs and any other
          AWS services needed.
docstr_tok: ["Create","the","artifact","by","calling","`","CreateArtifact","`","API","Args",":","sagemaker_session","(","sagemaker.session.Session",")",":","Session","object","which","manages","interactions","with","Amazon","SageMaker","APIs","and","any","other","AWS","services","needed","."]
code: def create_artifact(self, sagemaker_session):
      """Create the artifact by calling `CreateArtifact` API
  
      Args:
          sagemaker_session (sagemaker.session.Session): Session object which
              manages interactions with Amazon SageMaker APIs and any other
              AWS services needed.
      """
      source_ids = []
      if self.etag:
          source_ids.append(
              {"SourceIdType": "S3ETag", "Value": self.etag}
          )
  
      try:
          response = sagemaker_session.sagemaker_client.create_artifact(
              ArtifactName=self.name,
              ArtifactType=self.artifact_type,
              Source={
                  "SourceUri": self.source_uri,
                  "SourceTypes": source_ids,
              },
          )
          self.artifact_arn = response["ArtifactArn"]
      except botocore.exceptions.ClientError as err:
          err_info = err.response["Error"]
          if not is_already_exist_error(err_info):
              raise
          logger.warning(
              "Skip creating the artifact since it already exists: %s",
              err_info["Message"],
          )
  
imports: from __future__ import absolute_import
  import json
  import logging
  import os
  import botocore
  from sagemaker import s3
  from sagemaker.experiments._utils import is_already_exist_error
label_desc: Use image node_id 2 for calling the _LineageArtifactManager obj's underlying member method code with example usage: obj.create_artifact(sagemaker_session) without return types