class_docstr: A class to turn legacy mode parameters into hyperparameters.
  
  It also disables the ``model_dir`` hyperparameter, and set the
  image URI when instantiating a TensorFlow estimator.
docstr: Modifies the ``ast.Call`` node's keywords.
  
  The keywords are modified to turn TensorFlow legacy mode parameters
  into hyperparameters and sets ``model_dir=False``.
  
  The parameters that are converted into hyperparameters:
  
  - ``training_steps``
  - ``evaluation_steps``
  - ``checkpoint_path``
  - ``requirements_file``
  
  Args:
      node (ast.Call): a node that represents a TensorFlow constructor.
  
  Returns:
      ast.AST: the original node, which has been potentially modified.
docstr_tok: ["Modifies","the","``","ast.Call","``","node","'s","keywords",".","The","keywords","are","modified","to","turn","TensorFlow","legacy","mode","parameters","into","hyperparameters","and","sets","``","model_dir=False","``",".","The","parameters","that","are","converted","into","hyperparameters",":","-","``","training_steps","``","-","``","evaluation_steps","``","-","``","checkpoint_path","``","-","``","requirements_file","``","Args",":","node","(","ast.Call",")",":","a","node","that","represents","a","TensorFlow","constructor",".","Returns",":","ast.AST",":","the","original","node",",","which","has","been","potentially","modified","."]
code: def modify_node(self, node):
      """Modifies the ``ast.Call`` node's keywords.
  
      The keywords are modified to turn TensorFlow legacy mode parameters
      into hyperparameters and sets ``model_dir=False``.
  
      The parameters that are converted into hyperparameters:
  
      - ``training_steps``
      - ``evaluation_steps``
      - ``checkpoint_path``
      - ``requirements_file``
  
      Args:
          node (ast.Call): a node that represents a TensorFlow constructor.
  
      Returns:
          ast.AST: the original node, which has been potentially modified.
      """
      base_hps = {}
      additional_hps = {}
      kw_to_remove = (
          []
      )  # remove keyword args after so that none are skipped during iteration
  
      add_image_uri = True
  
      for kw in node.keywords:
          if kw.arg in ("script_mode", "model_dir"):
              # model_dir is removed so that it can be set to False later
              kw_to_remove.append(kw)
          if kw.arg == "hyperparameters" and kw.value:
              base_hps = dict(zip(kw.value.keys, kw.value.values))
              kw_to_remove.append(kw)
          if kw.arg in LEGACY_MODE_PARAMETERS and kw.value:
              hp_key = self._hyperparameter_key_for_param(kw.arg)
              additional_hps[hp_key] = kw.value
              kw_to_remove.append(kw)
          if kw.arg == "image_uri":
              add_image_uri = False
  
      self._remove_keywords(node, kw_to_remove)
      self._add_updated_hyperparameters(node, base_hps, additional_hps)
  
      if add_image_uri:
          image_uri = self._image_uri_from_args(node.keywords)
          if image_uri:
              node.keywords.append(
                  ast.keyword(
                      arg="image_uri", value=ast.Str(s=image_uri)
                  )
              )
  
      node.keywords.append(
          ast.keyword(
              arg="model_dir", value=ast.NameConstant(value=False)
          )
      )
      return node
  
imports: from __future__ import absolute_import
  import ast
  import boto3
  import six
  from sagemaker.cli.compatibility.v2.modifiers import framework_version, matching
  from sagemaker.cli.compatibility.v2.modifiers.modifier import Modifier
  from sagemaker import image_uris
label_desc: Use image node_id 5 for calling the TensorFlowLegacyModeConstructorUpgrader obj's underlying member method code with example usage: obj.modify_node(node) and returns: node