def METHOD_NAME(docs: list[Doc], fullname_fragments) -> tuple[str, str]:
    common_txt = os.path.commonprefix([doc.text for doc in docs])
    combined_txt = common_txt \
        if len(common_txt) > 100 else \
        '\n'.join(f'====={doc.title}\n\n' + doc.text[:400] + '...' for doc in docs)
    links = ['<a href="https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#' +
             f'{fragment}" target="_blank" rel="noopener noreferrer">{fullname_plus_annotation(fullname, fragment)}' +
             ' <sup><small class="fas fa-external-link-alt opens-new-window"' +
             ' title="Opens in a new window"></small></sup></a>'
             for fullname, fragment in fullname_fragments]
    return combined_txt[:4000] + ' ...', \
           'For more information, visit ' + ', '.join(links) + '.' + \
           '\n'.join([f'<h1>{doc.title}</h1>' + doc.html for doc in docs])