code: def primaryName(self, value: Optional[str]) -> None:
          
          if value is not None:
              self.warned_no_primary = False
          self.primaryNames[self.viewNo] = value
          self.compact_primary_names()
          if value != self._primaryName:
              self._primaryName = value
              self.logger.info("{} setting primaryName for view no {} to: {}".
                               format(self, self.viewNo, value))
              if value is None:
                  # Since the GC needs to happen after a primary has been
                  # decided.
                  return
              self._gc_before_new_view()
              if self.__should_reset_watermarks_before_new_view():
                  self._reset_watermarks_before_new_view()
docs: Set the value of isPrimary.
  
          :param value: the value to set isPrimary to