code: def create(cls, messageType, extended, hopsleft=3, hopsmax=3):
          
          flags = MessageFlags(None)
          if messageType < 8:
              flags._messageType = messageType
          else:
              flags._messageType = messageType >> 5
          if extended in [0, 1, True, False]:
              if extended:
                  flags._extended = 1
              else:
                  flags._extended = 0
          else:
              flags._extended = extended >> 4
          flags._hopsLeft = hopsleft
          flags._hopsMax = hopsmax
          return flags
docs: Create message flags.
  
          messageType: integter 0 to 7:
              MESSAGE_TYPE_DIRECT_MESSAGE = 0
              MESSAGE_TYPE_DIRECT_MESSAGE_ACK = 1
              MESSAGE_TYPE_ALL_LINK_CLEANUP = 2
              MESSAGE_TYPE_ALL_LINK_CLEANUP_ACK = 3
              MESSAGE_TYPE_BROADCAST_MESSAGE = 4
              MESSAGE_TYPE_DIRECT_MESSAGE_NAK = 5
              MESSAGE_TYPE_ALL_LINK_BROADCAST = 6
              MESSAGE_TYPE_ALL_LINK_CLEANUP_NAK = 7
          extended: 1 for extended, 0 for standard
          hopsleft: int  0 - 3
          hopsmax:  int  0 - 3