code: def _extract_files_from_docker(
      docker_image: str, files: Dict[str, str]
  ):
      """Extract files from docker container image and save to local disk.
  
      ``files`` is a dict mapping from paths inside the docker container to
      local paths on the host system.
      """
      # Create container
      container = DOCKER_CLIENT.containers.create(docker_image)
      for container_path, local_path in files.items():
          # Get tar stream of file
          stream, stat = container.get_archive(f"{container_path}")
          # Create local directory containing target file
          local_path = Path(local_path)
          local_path.parent.mkdir(exist_ok=True)
          # Read tar stream into bytes IO
          with tarfile.open(
              fileobj=io.BytesIO(b"".join(d for d in stream))
          ) as tar:
              # Extract file from tar archive into local path
              with open(local_path, "wb") as f:
                  for r in tar.extractfile(
                      os.path.basename(container_path)
                  ):
                      f.write(r)
      container.remove()
  
imports: import datetime
  import io
  import json
  import functools
  import glob
  import itertools
  import os
  import platform
  import shutil
  import subprocess
  import sys
  import tarfile
  from collections import defaultdict
  from pathlib import Path
  from typing import List, Optional, Tuple, Dict
  import click
  import docker
label_desc: Use image node_id 12 for calling a global function with example usage: _extract_files_from_docker(docker_image, files) without return types