code: def test_list(sagemaker_session):
      creation_time = datetime.datetime.now(
          datetime.timezone.utc
      ) + datetime.timedelta(hours=3)
      last_modified_time = datetime.datetime.now(
          datetime.timezone.utc
      ) + datetime.timedelta(hours=4)
  
      sagemaker_session.sagemaker_client.list_artifacts.side_effect = [
          {
              "ArtifactSummaries": [
                  {
                      "ArtifactArn": "A" + str(i),
                      "ArtifactName": "B" + str(i),
                      "Source": {
                          "SourceUri": "D" + str(i),
                          "source_types": [
                              {
                                  "SourceIdType": "source_id_type",
                                  "Value": "value1",
                              }
                          ],
                      },
                      "ArtifactType": "test-type",
                      "CreationTime": creation_time
                      + datetime.timedelta(hours=i),
                      "LastModifiedTime": last_modified_time
                      + datetime.timedelta(hours=i),
                  }
                  for i in range(10)
              ],
              "NextToken": "100",
          },
          {
              "ArtifactSummaries": [
                  {
                      "ArtifactArn": "A" + str(i),
                      "ArtifactName": "B" + str(i),
                      "Source": {
                          "SourceUri": "D" + str(i),
                          "source_types": [
                              {
                                  "SourceIdType": "source_id_type",
                                  "Value": "value1",
                              }
                          ],
                      },
                      "ArtifactType": "test-type",
                      "CreationTime": creation_time
                      + datetime.timedelta(hours=i),
                      "LastModifiedTime": last_modified_time
                      + datetime.timedelta(hours=i),
                  }
                  for i in range(10, 20)
              ]
          },
      ]
  
      expected = [
          _api_types.ArtifactSummary(
              artifact_arn="A" + str(i),
              artifact_name="B" + str(i),
              source=_api_types.ArtifactSource(
                  source_uri="D" + str(i),
                  source_types=[
                      {
                          "SourceIdType": "source_id_type",
                          "Value": "value1",
                      }
                  ],
              ),
              artifact_type="test-type",
              creation_time=creation_time + datetime.timedelta(hours=i),
              last_modified_time=last_modified_time
              + datetime.timedelta(hours=i),
          )
          for i in range(20)
      ]
      result = list(
          artifact.Artifact.list(
              sagemaker_session=sagemaker_session,
              source_uri="foo",
              artifact_type="bar",
              sort_by="CreationTime",
              sort_order="Ascending",
          )
      )
  
      assert expected == result
      expected_calls = [
          unittest.mock.call(
              SortBy="CreationTime",
              SortOrder="Ascending",
              SourceUri="foo",
              ArtifactType="bar",
          ),
          unittest.mock.call(
              NextToken="100",
              SortBy="CreationTime",
              SortOrder="Ascending",
              SourceUri="foo",
              ArtifactType="bar",
          ),
      ]
      assert (
          expected_calls
          == sagemaker_session.sagemaker_client.list_artifacts.mock_calls
      )
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/lineage/test_artifact.py
imports: from __future__ import absolute_import
  import datetime
  import unittest.mock
  from sagemaker.lineage import artifact, _api_types
label_desc: Use image node_id 6 for calling a global function with example usage: test_list(sagemaker_session) without return types