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: Returns an ``ast.keyword`` for the ``hyperparameters`` kwarg if there are any.
docstr_tok: ["Returns","an","``","ast.keyword","``","for","the","``","hyperparameters","``","kwarg","if","there","are","any","."]
code: def _to_ast_keyword(self, hps):
      """Returns an ``ast.keyword`` for the ``hyperparameters`` kwarg if there are any."""
      if hps:
          keys, values = zip(*six.iteritems(hps))
          return ast.keyword(
              arg="hyperparameters",
              value=ast.Dict(keys=keys, values=values),
          )
  
      return None
  
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 9 for calling the TensorFlowLegacyModeConstructorUpgrader obj's underlying member method code with example usage: obj._to_ast_keyword(hps) and returns: None, ast