def METHOD_NAME(
    solvers_api: osparc.SolversApi,
    files_api: osparc.FilesApi,
    sim: Simulation,
    solver_version: str,
    wait: Optional[bool] = True,
) -> tuple[osparc.Job, osparc.JobStatus]:
    solver_type = get_solver_type(sim)
    solver: osparc.Solver = get_isolve(solvers_api, solver_type, version=solver_version)
    # the input file if not multiport
    if isinstance(sim, EmFdtdMultiportSimulation):
        raise NotImplementedError
    input_1: osparc.File = files_api.upload_file(file=sim.InputFileName(0))
    input_2 = None
    # parallelization
    nranks = ngpus = None
    if solver_type == ISolveType.mpi:
        nranks = sim.SolverSettings.NumberOfProcesses.Value
        input_2 = nranks
    elif solver_type == ISolveType.gpu:
        ngpus = sim.SolverSettings.NumberOfGpus.Value
        input_2 = ngpus
    job_inputs = {"input_1": input_1}
    if input_2 is not None:
        job_inputs.update({"input_2": input_2})
    job = solvers_api.create_job(
        solver_key=solver.id,
        version=solver.version,
        job_inputs=osparc.JobInputs(job_inputs),
    )
    status: osparc.JobStatus = solvers_api.start_job(solver.id, solver.version, job.id)
    while not status.stopped_at:
        # For sim4life we can crate CJobProgressInfo and register the job in the taskmanager
        # However, I think the isolve Progress is not captured correctly in the sidecar.
        time.sleep(0.5)
        status: osparc.JobStatus = solvers_api.inspect_job(
            solver.id, solver.version, job.id
        )
        logger.info(f"Solver progress: {status.progress}/100")
    def get_results():
        outputs: osparc.JobOutputs = solvers_api.get_job_outputs(
            solver.id, solver.version, job.id
        )
        output_file = outputs.results["output_1"]
        log_file = outputs.results["output_2"]
        # move the output.h5 to the correct place with the correct filename
        if not output_file is None and isinstance(output_file, osparc.File):
            download_file_name: str = files_api.download_file(file_id=output_file.id)
            destination = sim.OutputFileName(0)
            shutil.move(download_file_name, destination)
        # move the log to the correct place with the correct filename
        # TODO: the axware logs will be extracted but not renamed. But then again, who needs them?
        if not log_file is None and isinstance(log_file, osparc.File):
            download_file_name: str = files_api.download_file(file_id=log_file.id)
            destination_path = Path(sim.OutputFileName(0)).parent
            with tarfile.open(download_file_name, "r") as tar:
                tar.extractall(destination_path)
                log_file = destination_path / "input.log"
                if log_file.exists():
                    destination_file = destination_path / str(
                        Path(sim.OutputFileName(0)).stem + ".log"
                    )
                    shutil.move(log_file, destination_file)
    logger.info(f"Solver finished with status: {status.state}")
    if status.state == "SUCCESS":
        get_results()
    return job, status