code: def validateClientMsg(self, wrappedMsg):
          
          msg, frm = wrappedMsg
          if self.isClientBlacklisted(frm):
              self.discard(str(msg)[:256], "received from blacklisted client {}".format(frm), logger.display)
              return None
  
          needStaticValidation = False
          if all([msg.get(OPERATION), msg.get(f.REQ_ID.nm),
                  idr_from_req_data(msg)]):
              cls = self.client_request_class
              needStaticValidation = True
          elif OP_FIELD_NAME in msg:
              op = msg[OP_FIELD_NAME]
              cls = node_message_factory.get_type(op)
              if cls not in (Batch, LedgerStatus, CatchupReq):
                  raise InvalidClientMsgType(cls, msg.get(f.REQ_ID.nm))
          else:
              raise InvalidClientRequest(msg.get(f.IDENTIFIER.nm),
                                         msg.get(f.REQ_ID.nm))
          try:
              cMsg = cls(**msg)
          except TypeError as ex:
              raise InvalidClientRequest(msg.get(f.IDENTIFIER.nm),
                                         msg.get(f.REQ_ID.nm),
                                         str(ex))
          except Exception as ex:
              raise InvalidClientRequest(msg.get(f.IDENTIFIER.nm),
                                         msg.get(f.REQ_ID.nm)) from ex
  
          if needStaticValidation:
              self.doStaticValidation(cMsg)
  
          self.execute_hook(NodeHooks.PRE_SIG_VERIFICATION, cMsg)
          self.verifySignature(cMsg)
          self.execute_hook(NodeHooks.POST_SIG_VERIFICATION, cMsg)
          # Suspicions should only be raised when lot of sig failures are
          # observed
          # try:
          #     self.verifySignature(cMsg)
          # except UnknownIdentifier as ex:
          #     raise
          # except Exception as ex:
          #     raise SuspiciousClient from ex
          logger.trace("{} received CLIENT message: {}".
                       format(self.clientstack.name, cMsg))
          return cMsg, frm
docs: Validate a message sent by a client.
          :param wrappedMsg: a message from a client
          :return: Tuple of clientMessage and client address