code: def test_query_lineage_result_str(sagemaker_session):
      lineage_query = LineageQuery(sagemaker_session)
      sagemaker_session.sagemaker_client.query_lineage.return_value = {
          "Vertices": [
              {
                  "Arn": "arn1",
                  "Type": "Endpoint",
                  "LineageType": "Artifact",
              },
              {
                  "Arn": "arn2",
                  "Type": "Model",
                  "LineageType": "Context",
              },
          ],
          "Edges": [
              {
                  "SourceArn": "arn1",
                  "DestinationArn": "arn2",
                  "AssociationType": "Produced",
              }
          ],
      }
  
      query_response = lineage_query.query(
          start_arns=[
              "arn:aws:sagemaker:us-west-2:0123456789012:context/mycontext"
          ]
      )
  
      response_str = query_response.__str__()
      pattern = r"Mock id='\d*'"
      replace = r"Mock id=''"
      response_str = re.sub(pattern, replace, response_str)
  
      assert (
          response_str
          == "{'edges': [\n\t{'source_arn': 'arn1', 'destination_arn': 'arn2', 'association_type': 'Produced'}],"
          + "\n\n'vertices': [\n\t{'arn': 'arn1', 'lineage_entity': 'Artifact', 'lineage_source': 'Endpoint', "
          + "'_session': <Mock id=''>}, \n\t{'arn': 'arn2', 'lineage_entity': 'Context', 'lineage_source': "
          + "'Model', '_session': <Mock id=''>}],\n\n'startarn': "
          + "['arn:aws:sagemaker:us-west-2:0123456789012:context/mycontext'],\n}"
      )
  
imports: from __future__ import absolute_import
  import unittest.mock
  from sagemaker.lineage.artifact import DatasetArtifact, ModelArtifact, Artifact
  from sagemaker.lineage.context import EndpointContext, Context
  from sagemaker.lineage.action import Action
  from sagemaker.lineage.lineage_trial_component import LineageTrialComponent
  from sagemaker.lineage.query import LineageEntityEnum, LineageSourceEnum, Vertex, LineageQuery
  import pytest
  import re
label_desc: Use image node_id 16 for calling a global function with example usage: test_query_lineage_result_str(sagemaker_session) without return types