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: Modifies the ``ast.Module`` node by inserted the specified node.
  
  The ``import_node`` object is inserted immediately before the first
  import statement.
  
  Args:
      node (ast.Module): a node that represents a Python module.
  
  Returns:
      ast.Module: a node that represents a Python module, which has been
          modified to import a module.
docstr_tok: ["Modifies","the","``","ast.Module","``","node","by","inserted","the","specified","node",".","The","``","import_node","``","object","is","inserted","immediately","before","the","first","import","statement",".","Args",":","node","(","ast.Module",")",":","a","node","that","represents","a","Python","module",".","Returns",":","ast.Module",":","a","node","that","represents","a","Python","module",",","which","has","been","modified","to","import","a","module","."]
code: def modify_node(self, module):
      """Modifies the ``ast.Module`` node by inserted the specified node.
  
      The ``import_node`` object is inserted immediately before the first
      import statement.
  
      Args:
          node (ast.Module): a node that represents a Python module.
  
      Returns:
          ast.Module: a node that represents a Python module, which has been
              modified to import a module.
      """
      for i, node in enumerate(module.body):
          if isinstance(node, (ast.Import, ast.ImportFrom)):
              module.body.insert(i, self.import_node)
              return module
  
      module.body.insert(0, self.import_node)
      return module
  
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 3 for calling the _ImportInserter obj's underlying member method code with example usage: obj.modify_node(module) and returns: module, module