code: def build_and_push_docker_image(container_image: str, repo_base: str):
      """Build and push docker image using `tfx/tools/docker/Dockerfile`.
  
      Note: The local copy of the image will be deleted after push.
  
      Args:
        container_image: Docker container image name.
        repo_base: The src path to use to build docker image.
      """
      build_docker_image(container_image, repo_base)
  
      client = docker.from_env(timeout=_DOCKER_TIMEOUT_SECONDS)
      logging.info("Pushing image %s", container_image)
      with Timer("PushingTFXContainerImage"):
          client.images.push(repository=container_image)
      with Timer("DeletingLocalTFXContainerImage"):
          client.images.remove(image=container_image)
  
file_path: tfx/tfx/orchestration/test_utils.py
imports: import contextlib
  import os
  import random
  import string
  import subprocess
  import time
  from absl import logging
  import docker
label_desc: Use image node_id 4 for calling a global function with example usage: build_and_push_docker_image(container_image, repo_base) without return types