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: Checks if the ``ast.Call`` node instantiates a TensorFlow estimator with legacy mode.
  
  This looks for the following formats:
  
  - ``TensorFlow``
  - ``sagemaker.tensorflow.TensorFlow``
  - ``sagemaker.tensorflow.estimator.TensorFlow``
  
  Legacy mode is enabled if (1) ``script_mode`` is ``False``, ``None``, or not specified,
  and (2) if ``py_version`` is ``py2`` or not specified.
  
  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`` is instantiating a TensorFlow estimator with legacy mode.
docstr_tok: ["Checks","if","the","``","ast.Call","``","node","instantiates","a","TensorFlow","estimator","with","legacy","mode",".","This","looks","for","the","following","formats",":","-","``","TensorFlow","``","-","``","sagemaker.tensorflow.TensorFlow","``","-","``","sagemaker.tensorflow.estimator.TensorFlow","``","Legacy","mode","is","enabled","if","(","1",")","``","script_mode","``","is","``","False","``",",","``","None","``",",","or","not","specified",",","and","(","2",")","if","``","py_version","``","is","``","py2","``","or","not","specified",".","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","``","is","instantiating","a","TensorFlow","estimator","with","legacy","mode","."]
code: def node_should_be_modified(self, node):
      """Checks if the ``ast.Call`` node instantiates a TensorFlow estimator with legacy mode.
  
      This looks for the following formats:
  
      - ``TensorFlow``
      - ``sagemaker.tensorflow.TensorFlow``
      - ``sagemaker.tensorflow.estimator.TensorFlow``
  
      Legacy mode is enabled if (1) ``script_mode`` is ``False``, ``None``, or not specified,
      and (2) if ``py_version`` is ``py2`` or not specified.
  
      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`` is instantiating a TensorFlow estimator with legacy mode.
      """
      is_tf_constructor = matching.matches_name_or_namespaces(
          node, "TensorFlow", TF_NAMESPACES
      )
      return is_tf_constructor and self._is_legacy_mode(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 3 for calling the TensorFlowLegacyModeConstructorUpgrader obj's underlying member method code with example usage: obj.node_should_be_modified(node) and returns: unknown