code: def rename(self, name):
          
          if is_valid_name(name):
              if name not in self.system.models:
                  self.name = name
                  return True  # Rename success
              else:  # Model name already exists
                  return False
          else:
              raise ValueError("Invalid name '%s'." % name)
docs: Rename self. Must be called only by its system.