code: def matches_name_or_namespaces(node, name, namespaces):
      """Determines if the ``ast.Call`` node matches the function name in the right namespace.
  
      Args:
          node (ast.Call): a node that represents a function call. For more,
              see https://docs.python.org/3/library/ast.html#abstract-grammar.
          name (str): the function name.
          namespaces (tuple): the possible namespaces to match to.
  
      Returns:
          bool: if the node matches the name and any of the namespaces.
      """
      if matches_name(node, name):
          return True
  
      if not matches_attr(node, name):
          return False
  
      return any(
          matches_namespace(node, namespace) for namespace in namespaces
      )
  
file_path: sagemaker-python-sdk/src/sagemaker/cli/compatibility/v2/modifiers/matching.py
imports: from __future__ import absolute_import
  import ast
  from sagemaker.cli.compatibility.v2.modifiers import parsing
label_desc: Use image node_id 2 for calling a global function with example usage: matches_name_or_namespaces(node, name, namespaces) and returns: any, True, False