class_docstr: A class to insert import statements into the Python module.
class_docstr_tok: ["A","class","to","insert","import","statements","into","the","Python","module","."]
docstr: Checks if the ``ast.Module`` node contains references to the specified class names.
  
  Args:
      node (ast.Module): a node that represents a Python module. For more,
          see https://docs.python.org/3/library/ast.html#abstract-grammar.
  
  Returns:
      bool: If the ``ast.Module`` references one of the specified classes.
docstr_tok: ["Checks","if","the","``","ast.Module","``","node","contains","references","to","the","specified","class","names",".","Args",":","node","(","ast.Module",")",":","a","node","that","represents","a","Python","module",".","For","more",",","see","https",":","\/\/docs.python.org\/3\/library\/ast.html","#","abstract-grammar",".","Returns",":","bool",":","If","the","``","ast.Module","``","references","one","of","the","specified","classes","."]
code: def node_should_be_modified(self, module):
      """Checks if the ``ast.Module`` node contains references to the specified class names.
  
      Args:
          node (ast.Module): a node that represents a Python module. For more,
              see https://docs.python.org/3/library/ast.html#abstract-grammar.
  
      Returns:
          bool: If the ``ast.Module`` references one of the specified classes.
      """
      for node in ast.walk(module):
          if isinstance(node, ast.Name) and node.id in self.class_names:
              return True
          if (
              isinstance(node, ast.Attribute)
              and node.attr in self.class_names
          ):
              return True
      return False
  
imports: from __future__ import absolute_import
  import ast
  from sagemaker.cli.compatibility.v2.modifiers import matching
  from sagemaker.cli.compatibility.v2.modifiers.modifier import Modifier
label_desc: Use image node_id 2 for calling the _ImportInserter obj's underlying member method code with example usage: obj.node_should_be_modified(module) and returns: False, True, True