Merge sparse tensors (replace not sum identical indices)

Hi, I need to merge the elements from sparse tensor A into another sparse tensor B. I want to replace not sum elements at identical indices, so I cannot simply execute A + B. Is there a standard way to achieve this?