code: def rename_object(self, old, new):
          
          self._objects.replace(old, new)
          pairs = self._pairs
          pairs |= {(new, p) for p in self._properties
              if (old, p) in pairs and not pairs.remove((old, p))}
docs: Replace the name of an object by a new one.