code: def _framework_from_node(node):
      """Retrieves the framework class name based on the function call, and if it was a model
  
      Args:
          node (ast.Call): a node that represents the constructor of a framework class.
              This can represent either <Framework> or sagemaker.<framework>.<Framework>.
  
      Returns:
          str, bool: the (capitalized) framework class name, and if it is a model class
      """
      if isinstance(node.func, ast.Name):
          framework = node.func.id
      elif isinstance(node.func, ast.Attribute):
          framework = node.func.attr
      else:
          framework = ""
  
      is_model = framework.endswith("Model")
      if is_model:
          framework = framework[: framework.find("Model")]
  
      return framework, is_model
  
file_path: sagemaker-python-sdk/src/sagemaker/cli/compatibility/v2/modifiers/framework_version.py
imports: from __future__ import absolute_import
  import ast
  from packaging.version import InvalidVersion, Version
  from sagemaker.cli.compatibility.v2.modifiers import matching, parsing
  from sagemaker.cli.compatibility.v2.modifiers.modifier import Modifier
label_desc: Use image node_id 3 for calling a global function with example usage: _framework_from_node(node) and returns: framework,  is_model