code: def msgHasAcceptableInstId(self, msg, frm) -> bool:
          
          # TODO: refactor this! this should not do anything except checking!
          instId = getattr(msg, f.INST_ID.nm, None)
          if not (isinstance(instId, int) and instId >= 0):
              return False
          if instId >= self.requiredNumberOfInstances:
              if instId not in self.msgsForFutureReplicas:
                  self.msgsForFutureReplicas[instId] = deque()
              self.msgsForFutureReplicas[instId].append((msg, frm))
              logger.debug("{} queueing message {} for future protocol instance {}".format(self, msg, instId))
              return False
          return True
docs: Return true if the instance id of message corresponds to a correct
          replica.
  
          :param msg: the node message to validate
          :return: