class_docstr: Handle end-to-end training and deployment of user-provided TensorFlow code.
class_docstr_tok: ["Handle","end-to-end","training","and","deployment","of","user-provided","TensorFlow","code","."]
docstr: Placeholder docstring
docstr_tok: ["Placeholder","docstring"]
code: def _validate_args(self, py_version):
      """Placeholder docstring"""
  
      if py_version == "py2" and self._only_python_3_supported():
          msg = (
              "Python 2 containers are only available with {} and lower versions. "
              "Please use a Python 3 container.".format(
                  defaults.LATEST_PY2_VERSION
              )
          )
          raise AttributeError(msg)
  
      if self.image_uri is None and self._only_legacy_mode_supported():
          legacy_image_uri = image_uris.retrieve(
              "tensorflow",
              self.sagemaker_session.boto_region_name,
              instance_type=self.instance_type,
              version=self.framework_version,
              py_version=self.py_version,
              image_scope="training",
          )
  
          msg = (
              "TF {} supports only legacy mode. Please supply the image URI directly with "
              "'image_uri={}' and set 'model_dir=False'. If you are using any legacy parameters "
              "(training_steps, evaluation_steps, checkpoint_path, requirements_file), "
              "make sure to pass them directly as hyperparameters instead. For more, see "
              "https://sagemaker.readthedocs.io/en/v2.0.0.rc0/frameworks/tensorflow/upgrade_from_legacy.html."
          ).format(self.framework_version, legacy_image_uri)
  
          raise ValueError(msg)
  
imports: from __future__ import absolute_import
  import logging
  from typing import Optional, Union, Dict
  from packaging import version
  from sagemaker import image_uris, s3, utils
  from sagemaker.deprecations import renamed_kwargs
  from sagemaker.estimator import Framework, EstimatorBase
  import sagemaker.fw_utils
  from sagemaker.tensorflow import defaults
  from sagemaker.tensorflow.model import TensorFlowModel
  from sagemaker.transformer import Transformer
  from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT
  from sagemaker.workflow import is_pipeline_variable
  from sagemaker.tensorflow.training_compiler.config import TrainingCompilerConfig
  from sagemaker.workflow.entities import PipelineVariable
  from sagemaker.utils import format_tags
label_desc: Use image node_id 2 for calling the TensorFlow obj's underlying member method code with example usage: obj._validate_args(py_version) without return types