def METHOD_NAME(client, source_dir: pathlib.Path):
    perf_container_file = source_dir / pathlib.Path(
        "container/perf-measurement/Dockerfile"
    )
    perf_test_image, build_logs = client.images.build(
        path=source_dir.absolute().__str__(),
        dockerfile=perf_container_file.absolute().__str__(),
        tag=perf_container_tag,
    )
    for chunk in build_logs:
        if "stream" in chunk:
            for line in chunk["stream"].splitlines():
                logging.info(line)
    return perf_test_image