code: def test_matches_name_or_namespaces():
      name = "KMeans"
      namespaces = ("sagemaker", "sagemaker.amazon.kmeans")
  
      matches = ("KMeans()", "sagemaker.KMeans()")
      for call in matches:
          assert matching.matches_name_or_namespaces(
              ast_call(call), name, namespaces
          )
  
      non_matches = ("MXNet()", "sagemaker.mxnet.MXNet()")
      for call in non_matches:
          assert not matching.matches_name_or_namespaces(
              ast_call(call), name, namespaces
          )
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/cli/compatibility/v2/modifiers/test_matching.py
imports: from __future__ import absolute_import
  from sagemaker.cli.compatibility.v2.modifiers import matching
  from tests.unit.sagemaker.cli.compatibility.v2.modifiers.ast_converter import ast_call
label_desc: Use image node_id 2 for calling a global function with example usage: test_matches_name_or_namespaces() without return types