def METHOD_NAME(
    script,
    instance_type,
    instance_count,
    sagemaker_local_session,
    docker_image,
    framework_version,
    training_data_path,
    output_path=None,
    hyperparameters=None,
):
    hyperparameters = hyperparameters or {}
    estimator = TensorFlow(
        entry_point=script,
        role="SageMakerRole",
        instance_count=instance_count,
        instance_type=instance_type,
        sagemaker_session=sagemaker_local_session,
        image_uri=docker_image,
        model_dir="/opt/ml/model",
        output_path=output_path,
        hyperparameters=hyperparameters,
        base_job_name="test-tf",
        framework_version=framework_version,
        py_version="py3",
    )
    estimator.fit(training_data_path)