How to avoid duplicate names in node.SetName()?

如何避免node.SetName()重名呢?
比如,当重名时会自动添加数字,“N”,“N1”…

How to avoid duplicate names in node.SetName()?
For example, when the name is the same, the number will be automatically added, “N”, “N1”…

解决了:

node.SetName(slicer.mrmlScene.GetUniqueNameByString("N"))