code: def test_models(sagemaker_session):
      obj = context.EndpointContext(
          sagemaker_session, context_name="foo", context_arn="bazz"
      )
  
      sagemaker_session.sagemaker_client.list_associations.side_effect = [
          {
              "AssociationSummaries": [
                  {
                      "SourceArn": "bazz",
                      "SourceName": "X1",
                      "DestinationArn": "B0",
                      "DestinationName": "Y1",
                      "SourceType": "C1",
                      "DestinationType": "ModelDeployment",
                      "AssociationType": "E1",
                      "CreationTime": None,
                      "CreatedBy": None,
                  }
              ],
          },
          {
              "AssociationSummaries": [
                  {
                      "SourceArn": "B0",
                      "SourceName": "X2",
                      "DestinationArn": "B2",
                      "DestinationName": "Y2",
                      "SourceType": "C2",
                      "DestinationType": "Model",
                      "AssociationType": "E2",
                      "CreationTime": None,
                      "CreatedBy": None,
                  }
              ]
          },
      ]
  
      model_list = obj.models()
  
      expected_calls = [
          unittest.mock.call(
              SourceArn=obj.context_arn,
              DestinationType="ModelDeployment",
          ),
          unittest.mock.call(SourceArn="B0", DestinationType="Model"),
      ]
      assert (
          expected_calls
          == sagemaker_session.sagemaker_client.list_associations.mock_calls
      )
  
      expected_model_list = [
          _api_types.AssociationSummary(
              source_arn="B0",
              source_name="X2",
              destination_arn="B2",
              destination_name="Y2",
              source_type="C2",
              destination_type="Model",
              association_type="E2",
              creation_time=None,
              created_by=None,
          )
      ]
      assert expected_model_list == model_list
  
imports: from __future__ import absolute_import
  import unittest.mock
  from sagemaker.lineage import context, _api_types
  from sagemaker.lineage._api_types import ArtifactSource
  from sagemaker.lineage.artifact import ModelArtifact
label_desc: Use image node_id 1 for calling a global function with example usage: test_models(sagemaker_session) without return types