def METHOD_NAME(self, pyenv, image):
    with tempfile.TemporaryDirectory() as wd:
        logging.info(f"[{pyenv}] Running tests (temporary dir: '{wd}')")
        wd = Path(wd)
        tests_log: Path = self.logs_dir / f"{pyenv}_test.log"
        volumes = {
            ROOT_DIR: {'bind': '/tests', 'mode': 'ro'},
            str(self.dx_toolkit): {'bind': '/dx-toolkit/', 'mode': 'ro'}
        }
        if self.extra_requirements and len(self.extra_requirements) > 0:
            extra_requirements_file = wd / "extra_requirements.txt"
            with open(extra_requirements_file, 'w') as fh:
                fh.writelines(self.extra_requirements)
            volumes[extra_requirements_file] = {'bind': '/extra-requirements.txt', 'mode': 'ro'}
        command = " ".join(self.pytest_args) if self.pytest_args is not None and len(self.pytest_args) > 0 else None
        container = client.containers.run(
            image.id,
            command=command,
            volumes=volumes,
            environment={
                "DXPY_TEST_TOKEN": self.token,
                "DXPY_TEST_ENV": self.env,
            },
            detach=True
        )
        with open(tests_log, 'w') as fh:
            for msg in container.logs(stream=True, follow=True):
                fh.write(msg.decode())
                fh.flush()
        status = container.wait()["StatusCode"]
        try:
            container.remove()
        except:
            logging.exception(f"[{pyenv}] Cannot remove container")
        if status != 0:
            logging.error(f"[{pyenv}] Container exitted with non-zero return code. See log for console output: {tests_log.absolute()}")
            if self.print_logs or self.print_failed_logs:
                self._print_log(pyenv, tests_log)
            raise TestExecutionFailed("Docker container exited with non-zero code", extract_failed_tests(tests_log))
        logging.info(f"[{pyenv}] Tests execution successful")
        if self.print_logs:
            self._print_log(pyenv, tests_log)