def block2(self, value):
        """
        Set the Block2 option.

        :param value: the Block2 value
        """
        option = Option()
        option.number = defines.OptionRegistry.BLOCK2.number
        num, m, size = value
        if size > 512:
            szx = 6
        elif 256 < size <= 512:
            szx = 5
        elif 128 < size <= 256:
            szx = 4
        elif 64 < size <= 128:
            szx = 3
        elif 32 < size <= 64:
            szx = 2
        elif 16 < size <= 32:
            szx = 1
        else:
            szx = 0

        value = (num << 4)
        value |= (m << 3)
        value |= szx

        option.value = value
        self.add_option(option)
def block2 ( self , value ) : option = Option ( ) option . number = defines . OptionRegistry . BLOCK2 . number num , m , size = value if size > 512 : szx = 6 elif 256 < size <= 512 : szx = 5 elif 128 < size <= 256 : szx = 4 elif 64 < size <= 128 : szx = 3 elif 32 < size <= 64 : szx = 2 elif 16 < size <= 32 : szx = 1 else : szx = 0 value = ( num << 4 ) value |= ( m << 3 ) value |= szx option . value = value self . add_option ( option )
Set the Block2 option.

        :param value: the Block2 value