code: def test_add_downstream_feature_group_data_associations():
      with patch.object(
          Association, "create"
      ) as create_association_method:
          LineageAssociationHandler.add_downstream_feature_group_data_associations(
              feature_group_output=FEATURE_GROUP_INPUT[0],
              pipeline_context_arn="pipeline-context-arn",
              pipeline_version_context_arn="pipeline-version-context-arn",
              sagemaker_session=SAGEMAKER_SESSION_MOCK,
          )
  
      create_association_method.assert_has_calls(
          [
              call(
                  source_arn="pipeline-context-arn",
                  destination_arn=FEATURE_GROUP_INPUT[
                      0
                  ].pipeline_context_arn,
                  association_type="ContributedTo",
                  sagemaker_session=SAGEMAKER_SESSION_MOCK,
              ),
              call(
                  source_arn="pipeline-version-context-arn",
                  destination_arn=FEATURE_GROUP_INPUT[
                      0
                  ].pipeline_version_context_arn,
                  association_type="ContributedTo",
                  sagemaker_session=SAGEMAKER_SESSION_MOCK,
              ),
          ]
      )
      assert 2 == create_association_method.call_count
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/feature_store/feature_processor/lineage/test_lineage_association_handler.py
imports: from __future__ import absolute_import
  from mock import patch, call
  import pytest
  from sagemaker.feature_store.feature_processor.lineage._lineage_association_handler import LineageAssociationHandler
  from sagemaker.lineage.association import Association
  from botocore.exceptions import ClientError
  from test_constants import FEATURE_GROUP_INPUT, RAW_DATA_INPUT_ARTIFACTS, VALIDATION_EXCEPTION, NON_VALIDATION_EXCEPTION, SAGEMAKER_SESSION_MOCK, TRANSFORMATION_CODE_ARTIFACT_1
label_desc: Use image node_id 6 for calling a global function with example usage: test_add_downstream_feature_group_data_associations() without return types