code: def fragment(self, message):
          
          if message.message_type in [Types.CALL_RES,
                                      Types.CALL_REQ,
                                      Types.CALL_REQ_CONTINUE,
                                      Types.CALL_RES_CONTINUE]:
              rw = RW[message.message_type]
              payload_space = (common.MAX_PAYLOAD_SIZE -
                               rw.length_no_args(message))
              # split a call/request message into an array
              # with a call/request message and {0~n} continue
              # message
              fragment_msg = message.fragment(payload_space)
              self.generate_checksum(message)
  
              yield message
              while fragment_msg is not None:
                  message = fragment_msg
                  rw = RW[message.message_type]
                  payload_space = (common.MAX_PAYLOAD_SIZE -
                                   rw.length_no_args(message))
                  fragment_msg = message.fragment(payload_space)
                  self.generate_checksum(message)
                  yield message
          else:
              yield message
docs: Fragment message based on max payload size
  
          note: if the message doesn't need to fragment,
          it will return a list which only contains original
          message itself.
  
          :param message: raw message
          :return: list of messages whose sizes <= max
              payload size