def type_errors_to_diagnostics(type_errors: Sequence[error.Error]) -> Dict[(Path, List[lsp.Diagnostic])]:
    result: Dict[(Path, List[lsp.Diagnostic])] = {}
    for type_error in type_errors:
        result.setdefault(type_error.path, []).append(type_error_to_diagnostic(type_error))
    return result
def type_errors_to_diagnostics(type_errors: Sequence[error.Error]) -> Dict[(Path, List[lsp.Diagnostic])]:
    result: Dict[(Path, List[lsp.Diagnostic])] = {}
    for type_error in type_errors:
        result.setdefault(type_error.path, []).append(type_error_to_diagnostic(type_error))
    return result