def METHOD_NAME(context, image_uri, framework, task, py_version, script_url):
    """
    Shared code to execute single-node benchmarks
    :param context: Context() from callers
    :param image_uri: identifies mage
    :param framework: Framework ex(TF,MXNET)
    :param task: specifies task name
    :param py_version: python version
    :param script: github url to download script for benchmark
    """
    benchmark_client_id = os.getenv("BENCHMARK_CLIENT_ID")
    benchmark_endpoint = os.getenv("BENCHMARK_ENDPOINT")
    benchmark_exec = os.getenv("BENCHMARK_EXEC")
    container_name = (
        f"{framework}_single_node-{image_uri.split('/')[-1].replace('.', '-').replace(':', '-')}"
    )
    bai_dir = os.path.join(os.getcwd(), "benchmark", "bai")
    path_to_toml = os.path.join(bai_dir, framework, "training", f"{framework}_single.toml")
    custom_toml_name = f"custom_{framework}_{py_version}.toml"
    write_image_to_toml(image_uri, path_to_toml, task, custom_toml_name)
    toml = os.path.join("test", framework, "training", custom_toml_name)
    script_directory = re.search(r"[^/]+[A-Za-z0-9]+.git\Z", script_url).group().split(".")[0]
    context.run(
        f"docker run --name {container_name} -v {bai_dir}:{os.path.join(os.sep, 'test')} -itd bai_env_container",
        hide=True,
    )
    execute_cmd_on_container(context, container_name, f"git clone {script_url}")
    execute_cmd_on_container(
        context,
        container_name,
        f"curl http://{benchmark_endpoint}/api/tools/{benchmark_exec} " f"-o {benchmark_exec}",
    )
    execute_cmd_on_container(context, container_name, f"chmod u+x {benchmark_exec}")
    execute_cmd_on_container(context, container_name, f"./{benchmark_exec} --env-setup")
    execute_cmd_on_container(
        context, container_name, f"./{benchmark_exec} --register {benchmark_endpoint}"
    )
    execute_cmd_on_container(
        context, container_name, f"./{benchmark_exec} --set-client-id {benchmark_client_id}"
    )
    output = execute_cmd_on_container(
        context, container_name, f"./{benchmark_exec} --get-client-id"
    )
    assert benchmark_client_id in output.stdout, output.stdout
    execute_cmd_on_container(
        context,
        container_name,
        f"./{benchmark_exec} --submit {toml} --script {script_directory}",
        True,
    )
    execute_cmd_on_container(
        context, container_name, f"./{benchmark_exec} --watch --status --terminate"
    )