class_docstr: A class to remove Serde-related keyword arguments from call expressions.
class_docstr_tok: ["A","class","to","remove","Serde-related","keyword","arguments","from","call","expressions","."]
docstr: Checks if the ``ast.Call`` node uses deprecated keywords.
  
  In particular, this function checks if:
  
  - The ``ast.Call`` represents the ``create_model`` method.
  - Either the serializer or deserializer keywords are used.
  
  Args:
      node (ast.Call): a node that represents a function call. For more,
          see https://docs.python.org/3/library/ast.html#abstract-grammar.
  
  Returns:
      bool: If the ``ast.Call`` contains keywords that should be removed.
docstr_tok: ["Checks","if","the","``","ast.Call","``","node","uses","deprecated","keywords",".","In","particular",",","this","function","checks","if",":","-","The","``","ast.Call","``","represents","the","``","create_model","``","method",".","-","Either","the","serializer","or","deserializer","keywords","are","used",".","Args",":","node","(","ast.Call",")",":","a","node","that","represents","a","function","call",".","For","more",",","see","https",":","\/\/docs.python.org\/3\/library\/ast.html","#","abstract-grammar",".","Returns",":","bool",":","If","the","``","ast.Call","``","contains","keywords","that","should","be","removed","."]
code: def node_should_be_modified(self, node):
      """Checks if the ``ast.Call`` node uses deprecated keywords.
  
      In particular, this function checks if:
  
      - The ``ast.Call`` represents the ``create_model`` method.
      - Either the serializer or deserializer keywords are used.
  
      Args:
          node (ast.Call): a node that represents a function call. For more,
              see https://docs.python.org/3/library/ast.html#abstract-grammar.
  
      Returns:
          bool: If the ``ast.Call`` contains keywords that should be removed.
      """
      if (
          not isinstance(node.func, ast.Attribute)
          or node.func.attr != "create_model"
      ):
          return False
      return any(
          keyword.arg in {"serializer", "deserializer"}
          for keyword in node.keywords
      )
  
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 SerdeKeywordRemover obj's underlying member method code with example usage: obj.node_should_be_modified(node) and returns: any, False