def METHOD_NAME(setup):
    model_id, model_version = "huggingface-spc-bert-base-cased", "1.2.3"
    inference_instance_type = instance_types.retrieve_default(
        model_id=model_id, model_version=model_version, scope="inference"
    )
    training_instance_type = instance_types.retrieve_default(
        model_id=model_id, model_version=model_version, scope="training"
    )
    instance_count = 1
    print("Starting training...")
    image_uri = image_uris.retrieve(
        region=None,
        framework=None,
        image_scope="training",
        model_id=model_id,
        model_version=model_version,
        instance_type=training_instance_type,
    )
    script_uri = script_uris.retrieve(
        model_id=model_id, model_version=model_version, script_scope="training"
    )
    model_uri = model_uris.retrieve(
        model_id=model_id, model_version=model_version, model_scope="training"
    )
    default_hyperparameters = hyperparameters.retrieve_default(
        model_id=model_id,
        model_version=model_version,
    )
    default_hyperparameters["epochs"] = "1"
    default_metric_definitions = metric_definitions.retrieve_default(
        model_id=model_id,
        model_version=model_version,
    )
    estimator_kwargs = _retrieve_estimator_init_kwargs(
        model_id=model_id,
        model_version=model_version,
        instance_type=training_instance_type,
    )
    # Avoid exceeding resource limits
    if "max_run" in estimator_kwargs:
        del estimator_kwargs["max_run"]
    estimator = Estimator(
        image_uri=image_uri,
        source_dir=script_uri,
        model_uri=model_uri,
        entry_point=TRAINING_ENTRY_POINT_SCRIPT_NAME,
        role=get_sm_session().get_caller_identity_arn(),
        sagemaker_session=get_sm_session(),
        hyperparameters=default_hyperparameters,
        tags=[{"Key": JUMPSTART_TAG, "Value": os.environ[ENV_VAR_JUMPSTART_SDK_TEST_SUITE_ID]}],
        instance_count=instance_count,
        instance_type=training_instance_type,
        metric_definitions=default_metric_definitions,
        **estimator_kwargs,
    )
    fit_kwargs = _retrieve_estimator_fit_kwargs(
        model_id=model_id,
        model_version=model_version,
    )
    estimator.fit(
        {
            "training": f"s3://{get_jumpstart_content_bucket(JUMPSTART_DEFAULT_REGION_NAME)}/"
            f"{get_training_dataset_for_model_and_version(model_id, model_version)}",
        },
        **fit_kwargs,
    )
    print("Starting inference...")
    image_uri = image_uris.retrieve(
        region=None,
        framework=None,
        image_scope="inference",
        model_id=model_id,
        model_version=model_version,
        instance_type=inference_instance_type,
    )
    script_uri = script_uris.retrieve(
        model_id=model_id, model_version=model_version, script_scope="inference"
    )
    model_uri = model_uris.retrieve(
        model_id=model_id, model_version=model_version, model_scope="inference"
    )
    env = environment_variables.retrieve_default(
        model_id=model_id,
        model_version=model_version,
        include_aws_sdk_env_vars=False,
    )
    model_kwargs = _retrieve_model_init_kwargs(
        model_id=model_id,
        model_version=model_version,
    )
    deploy_kwargs = _retrieve_model_deploy_kwargs(
        model_id=model_id,
        model_version=model_version,
        instance_type=inference_instance_type,
    )
    predictor: Predictor = estimator.deploy(
        initial_instance_count=instance_count,
        instance_type=inference_instance_type,
        entry_point=INFERENCE_ENTRY_POINT_SCRIPT_NAME,
        image_uri=image_uri,
        source_dir=script_uri,
        tags=[{"Key": JUMPSTART_TAG, "Value": os.environ[ENV_VAR_JUMPSTART_SDK_TEST_SUITE_ID]}],
        env=env,
        **model_kwargs,
        **deploy_kwargs,
    )
    endpoint_invoker = EndpointInvoker(
        endpoint_name=predictor.endpoint_name,
    )
    response = endpoint_invoker.invoke_spc_endpoint(["hello", "world"])
    assert response is not None