code: def unpackNodeMsg(self, msg, frm) -> None:
          
          # TODO: why do we unpack batches here? Batching is a feature of
          # a transport, it should be encapsulated.
  
          if isinstance(msg, Batch):
              logger.trace("{} processing a batch {}".format(self, msg))
              with self.metrics.measure_time(MetricsName.UNPACK_BATCH_TIME):
                  for m in msg.messages:
                      try:
                          m = self.nodestack.deserializeMsg(m)
                      except Exception as ex:
                          logger.warning("Got error {} while processing {} message".format(ex, m))
                          continue
                      self.handleOneNodeMsg((m, frm))
          else:
              self.postToNodeInBox(msg, frm)
docs: If the message is a batch message validate each message in the batch,
          otherwise add the message to the node's inbox.
  
          :param msg: a node message
          :param frm: the name of the node that sent this `msg`