code: def _build_auto_capture_client_container(py_version, docker_templete):
      """Build a test docker container that will act as a client for auto_capture tests"""
      with _tmpdir() as tmpdir:
          print("building docker image locally in ", tmpdir)
          print("building source archive...")
          source_archive = _generate_sdk_tar_with_public_version(tmpdir)
          _move_auto_capture_test_file(tmpdir)
          with open(os.path.join(tmpdir, "Dockerfile"), "w") as file:
              file.writelines(
                  docker_templete.format(
                      py_version=py_version,
                      source_archive=source_archive,
                  )
              )
  
          docker_client = docker.from_env()
  
          print("building docker image...")
          image, build_logs = docker_client.images.build(
              path=tmpdir, tag=REPO_NAME, rm=True
          )
          return image.id
  
imports: from __future__ import absolute_import
  import base64
  import os
  import subprocess
  import shutil
  import pytest
  import docker
  import re
  import sys
  from docker.errors import BuildError
  from sagemaker.utils import sagemaker_timestamp, _tmpdir, sts_regional_endpoint
label_desc: Use image node_id 11 for calling a global function with example usage: _build_auto_capture_client_container(py_version, docker_templete) and returns: image