@staticmethod
def _join_out_err_to_debug_info(debug_info, out_err_errors):
    """
        Returns a string, that contains information from the given debug info and optionally for the given stdout/stderr
        errors.

        :param debug_info: A string describing the error
        :type debug_info: str
        :param out_err_errors: A list of strings describing errors that occurred during transfer of stdout/stderr
                               from the container.
        :type out_err_errors: list[str]
        :return: A string containing the given debug info and the optional out_err_errors
        :rtype: str
        """
    if out_err_errors:
        out_err_str = '\n'.join(out_err_errors)
        debug_info += '\nErrors during stdout/stderr transfer:\n{}'.format(
            out_err_str)
    return debug_info
