code: def encode_maxrespcode(self):
          
          value = self.mrcode
          if value < 128:
              code = value
          elif value > 31743:
              code = 255
          else:
              exp = 0
              value >>= 3
              while(value > 31):
                  exp += 1
                  value >>= 1
              exp <<= 4
              code = 0x80 | exp | (value & 0x0F)
          self.mrcode = code
docs: Encode and replace the mrcode value to its IGMPv3 encoded time value if needed,  # noqa: E501
          as specified in rfc3376#section-4.1.1.
  
          If value < 128, return the value specified. If >= 128, encode as a floating  # noqa: E501
          point value. Value can be 0 - 31744.