code: def unpack(self, buff, offset=0):
          
          header = UBInt16()
          header.unpack(buff[offset:offset+2])
          self.tlv_type = header.value >> 9
          length = header.value & 511
          begin, end = offset + 2, offset + 2 + length
          sub_type = UBInt8()
          sub_type.unpack(buff[begin:begin+1])
          self.sub_type = sub_type.value
          self.sub_value = BinaryData(buff[begin+1:end])
docs: Unpack a binary message into this object's attributes.
  
          Unpack the binary value *buff* and update this object attributes based
          on the results.
  
          Args:
              buff (bytes): Binary data package to be unpacked.
              offset (int): Where to begin unpacking.
  
          Raises:
              Exception: If there is a struct unpacking error.