code: def validateCommit(self, commit: Commit, sender: str) -> bool:
          
          key = (commit.viewNo, commit.ppSeqNo)
          if not self.has_prepared(key):
              self.enqueue_commit(commit, sender)
              return False
  
          if self.commits.hasCommitFrom(commit, sender):
              raise SuspiciousNode(sender, Suspicions.DUPLICATE_CM_SENT, commit)
  
          # BLS multi-sig:
          pre_prepare = self.getPrePrepare(commit.viewNo, commit.ppSeqNo)
          why_not = self._bls_bft_replica.validate_commit(commit, sender, pre_prepare)
  
          if why_not == BlsBftReplica.CM_BLS_SIG_WRONG:
              self.logger.warning("{} discard Commit message from "
                                  "{}:{}".format(self, sender, commit))
              raise SuspiciousNode(sender,
                                   Suspicions.CM_BLS_SIG_WRONG,
                                   commit)
          elif why_not is not None:
              self.logger.warning("Unknown error code returned for bls commit "
                                  "validation {}".format(why_not))
  
          return True
docs: Return whether the COMMIT specified is valid.
  
          :param commit: the COMMIT to validate
          :return: True if `request` is valid, False otherwise