def METHOD_NAME(
    url: str, binary: str,
    extract_dir: str=EXTRACT_DIR,
) -> str:
    '''
    Extract `binary` from `url` to `extract_dir`.
    '''
    dest = tempfile.gettempdir()
    tmptar = os.path.join(dest, 'temp.tar.xz')
    logging.info(f'Downloading {binary} from {url}, saving to {tmptar}')
    urllib.request.urlretrieve(url, tmptar)
    if not os.path.isdir(extract_dir):
        os.mkdir(extract_dir)
    with tarfile.open(tmptar, 'r:xz') as tar:
        logging.info(f'Extracting {binary} from {tmptar}')
        # Find clang-format inside tar, extract to tmp directory
        path_in_tar = next(
            filter(lambda n: n.endswith(f'/{binary}'), tar.getnames())
        )
        tar_extract_path = tempfile.gettempdir()
        tar.extract(path_in_tar, path=tar_extract_path)
        # Move to final location
        final_location = os.path.join(extract_dir, binary)
        shutil.move(os.path.join(tar_extract_path, path_in_tar), final_location)
        logging.info(f'Extracted {path_in_tar} to {final_location}')
    return final_location