class_docstr: A class to update ``import sagemaker.tensorflow.serving``.
class_docstr_tok: ["A","class","to","update","``","import","sagemaker.tensorflow.serving","``","."]
docstr: Checks if the ``ast.Import`` node imports the ``sagemaker.tensorflow.serving`` module.
  
  If ``ast.Import`` node imports the ``sagemaker.tensorflow.serving`` module,
  this function changes it to ``sagemaker.tensorflow``.
  
  Args:
      node (ast.Import): a node that represents an import statement. For more,
          see https://docs.python.org/3/library/ast.html#abstract-grammar.
  
  Returns:
      ast.AST: the original node, which has been potentially modified.
docstr_tok: ["Checks","if","the","``","ast.Import","``","node","imports","the","``","sagemaker.tensorflow.serving","``","module",".","If","``","ast.Import","``","node","imports","the","``","sagemaker.tensorflow.serving","``","module",",","this","function","changes","it","to","``","sagemaker.tensorflow","``",".","Args",":","node","(","ast.Import",")",":","a","node","that","represents","an","import","statement",".","For","more",",","see","https",":","\/\/docs.python.org\/3\/library\/ast.html","#","abstract-grammar",".","Returns",":","ast.AST",":","the","original","node",",","which","has","been","potentially","modified","."]
code: def check_and_modify_node(self, node):
      """Checks if the ``ast.Import`` node imports the ``sagemaker.tensorflow.serving`` module.
  
      If ``ast.Import`` node imports the ``sagemaker.tensorflow.serving`` module,
      this function changes it to ``sagemaker.tensorflow``.
  
      Args:
          node (ast.Import): a node that represents an import statement. For more,
              see https://docs.python.org/3/library/ast.html#abstract-grammar.
  
      Returns:
          ast.AST: the original node, which has been potentially modified.
      """
      for module in node.names:
          if module.name == "sagemaker.tensorflow.serving":
              module.name = "sagemaker.tensorflow"
      return node
  
file_path: sagemaker-python-sdk/src/sagemaker/cli/compatibility/v2/modifiers/tfs.py
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 1 for calling the TensorFlowServingImportRenamer obj's underlying member method code with example usage: obj.check_and_modify_node(node) and returns: node