def METHOD_NAME(workspace, libspec_manager, data_regression):
    from robotframework_ls.impl.completion_context import CompletionContext
    from robotframework_ls.impl.rename import rename, prepare_rename
    workspace.set_root("case4", libspec_manager=libspec_manager, index_workspace=True)
    doc = workspace.get_doc("case4resource3.robot")
    line = doc.find_line_with_contents("Yet Another Equal Redefined")
    col = 6
    completion_context = CompletionContext(
        doc, workspace=workspace.ws, line=line, col=col
    )
    result = prepare_rename(completion_context)
    data_regression.check(
        result,
        basename="test_rename_from_keyword_definition.prepare",
    )
    result = rename(completion_context, "Rara")
    assert result
    check_data_regression(result["changes"], data_regression)