How do deselect asset in Content Browser

Hi I’m a beginner at Unreal C++ programing.
I want to deselect assets from Content Browser.

#include "ZFunction.h"
#include "Engine/Selection.h"
#include "EditorUtilityLibrary.h"


void UZFunction::CalledFromPython(FString InputString) {
	UE_LOG(LogTemp, Error, TEXT("%s"), *InputString);
}

void UZFunction::SelectAssets(FString AssetPath)
{
	TArray<UObject*> SelectedObjects = UEditorUtilityLibrary::GetSelectedAssets();

	uint32 counter = 0;

	for (UObject* SelectedObject : SelectedObjects)
	{
		if (ensure(SelectedObject))
		{
			SelectedObject.Deselect();
		}
	}
}

I found USelection but it doesn’t work
How can I use Deselect function on UObject?
And is there a way to deselect assets in Python?