async def _publish_diagnostics(output_channel: connection.TextWriter, path: Path, diagnostics: Sequence[lsp.Diagnostic]) -> None:
    LOG.debug(f'Publish diagnostics for {path}: {diagnostics}')
    (await lsp.write_json_rpc(output_channel, json_rpc.Request(method='textDocument/publishDiagnostics', parameters=json_rpc.ByNameParameters({'uri': lsp.DocumentUri.from_file_path(path).unparse(), 'diagnostics': [diagnostic.to_dict() for diagnostic in diagnostics]}))))
async def _publish_diagnostics(output_channel: connection.TextWriter, path: Path, diagnostics: Sequence[lsp.Diagnostic]) -> None:
    LOG.debug(f'Publish diagnostics for {path}: {diagnostics}')
    (await lsp.write_json_rpc(output_channel, json_rpc.Request(method='textDocument/publishDiagnostics', parameters=json_rpc.ByNameParameters({'uri': lsp.DocumentUri.from_file_path(path).unparse(), 'diagnostics': [diagnostic.to_dict() for diagnostic in diagnostics]}))))