class_docstr: Class to handler the FeatureProcessor Lineage Associations
class_docstr_tok: ["Class","to","handler","the","FeatureProcessor","Lineage","Associations"]
docstr: Add Lineage Association.
  
  Arguments:
      source_arn (str): The source ARN.
      destination_arn (str): The destination ARN.
      association_type (str): The association type.
      sagemaker_session (Session): Session object which manages interactions
          with Amazon SageMaker APIs and any other AWS services needed. If not specified, the
          function creates one using the default AWS configuration chain.
docstr_tok: ["Add","Lineage","Association",".","Arguments",":","source_arn","(","str",")",":","The","source","ARN",".","destination_arn","(","str",")",":","The","destination","ARN",".","association_type","(","str",")",":","The","association","type",".","sagemaker_session","(","Session",")",":","Session","object","which","manages","interactions","with","Amazon","SageMaker","APIs","and","any","other","AWS","services","needed",".","If","not","specified",",","the","function","creates","one","using","the","default","AWS","configuration","chain","."]
code: def _add_association(
      source_arn: str,
      destination_arn: str,
      association_type: str,
      sagemaker_session: Session,
  ) -> None:
      """Add Lineage Association.
  
      Arguments:
          source_arn (str): The source ARN.
          destination_arn (str): The destination ARN.
          association_type (str): The association type.
          sagemaker_session (Session): Session object which manages interactions
              with Amazon SageMaker APIs and any other AWS services needed. If not specified, the
              function creates one using the default AWS configuration chain.
      """
      try:
          logger.info(
              "Adding association with source_arn: "
              "%s, destination_arn: %s and association_type: %s.",
              source_arn,
              destination_arn,
              association_type,
          )
          Association.create(
              source_arn=source_arn,
              destination_arn=destination_arn,
              association_type=association_type,
              sagemaker_session=sagemaker_session,
          )
      except ClientError as e:
          if e.response[ERROR][CODE] == VALIDATION_EXCEPTION:
              logger.info("Association already exists")
          else:
              raise e
  
imports: from __future__ import absolute_import
  import logging
  from typing import List, Optional, Iterator
  from botocore.exceptions import ClientError
  from sagemaker import Session
  from sagemaker.feature_store.feature_processor.lineage._feature_group_contexts import FeatureGroupContexts
  from sagemaker.feature_store.feature_processor._constants import VALIDATION_EXCEPTION
  from sagemaker.feature_store.feature_processor.lineage.constants import CONTRIBUTED_TO, ERROR, CODE, SAGEMAKER, ASSOCIATED_WITH
  from sagemaker.lineage.artifact import Artifact
  from sagemaker.lineage.association import Association, AssociationSummary
label_desc: Use image node_id 9 for calling the LineageAssociationHandler obj's underlying member method code with example usage: obj._add_association(source_arn, destination_arn, association_type, sagemaker_session) without return types