code: def test_long_graph_visualize(sagemaker_session):
      lineage_resource_helper = LineageResourceHelper(
          sagemaker_session=sagemaker_session
      )
      long_graph_root_arn = lineage_resource_helper.create_artifact(
          artifact_name=name()
      )
      last_arn = long_graph_root_arn
  
      # create long graph
      # Artifact -> Artifact -> ... -> Artifact
      try:
          for i in range(10):
              new_artifact_arn = (
                  lineage_resource_helper.create_artifact(
                      artifact_name=name()
                  )
              )
              lineage_resource_helper.create_association(
                  source_arn=last_arn, dest_arn=new_artifact_arn
              )
              last_arn = new_artifact_arn
  
          lq = sagemaker.lineage.query.LineageQuery(sagemaker_session)
          lq_result = lq.query(
              start_arns=[long_graph_root_arn],
              direction=LineageQueryDirectionEnum.DESCENDANTS,
          )
          # max depth = 10 -> graph rendered only has length of ten (in DESCENDANTS direction)
          lq_result.visualize(path="longGraph.html")
  
      except Exception as e:
          print(e)
          assert False
  
      finally:
          lineage_resource_helper.clean_all()
  
file_path: sagemaker-python-sdk/tests/integ/sagemaker/lineage/test_lineage_visualize.py
imports: from __future__ import absolute_import
  import time
  import os
  import re
  import pytest
  import sagemaker.lineage.query
  from sagemaker.lineage.query import LineageQueryDirectionEnum
  from tests.integ.sagemaker.lineage.helpers import name, LineageResourceHelper
label_desc: Use image node_id 3 for calling a global function with example usage: test_long_graph_visualize(sagemaker_session) without return types