code: def isPrimaryForMsg(self, msg) -> Optional[bool]:
          
          return self.isPrimary if self.isMsgForCurrentView(msg) \
              else self.is_primary_in_view(msg.viewNo)
docs: Return whether this replica is primary if the request's view number is
          equal this replica's view number and primary has been selected for
          the current view.
          Return None otherwise.
          :param msg: message