def METHOD_NAME(self,
                         input_: Union[str, os.PathLike, None],
                         results: Dict[str, os.PathLike],
                         job_dump_result: bool=False):
    """
    Handling task results and redirect stdout if needed.
    Args:
        input_ (Union[str, os.PathLike, None]): Input from command line.
        results (Dict[str, os.PathLike]): Task outputs.
        job_dump_result (bool, optional): if True, dumps job results into file. Defaults to False.
    """
    if not self._is_job_input(input_) and len(
            results) == 1:  # Only one input sample
        raw_text = list(results.values())[0]
    else:
        raw_text = self._format_task_results(results)
    print(raw_text, end='')  # Stdout
    if self._is_job_input(
            input_) and job_dump_result:  # Dump to *.job.done 
        try:
            job_output_file = os.path.abspath(input_) + '.done'
            sys.stdout = open(job_output_file, 'w')
            print(raw_text, end='')
            logger.info(f'Results had been saved to: {job_output_file}')
        finally:
            sys.stdout.close()