code: def getBlockValue(self, block):
          
          if self._bit_count == 0:
              raise Exception( "The margin '" + self._name +
                               "' did not allocate any bits for the values")
          val = block.userState()
          if val in [ 0, -1 ]:
              return 0
  
          # Shift the value to the right
          val >>= self._bitRange[ 0 ]
  
          # Apply the mask to the value
          mask = 2 ** self._bit_count - 1
          val &= mask
          return val
docs: Provides the previously set block value respecting the bits range.
             0 value and not marked block are treated the same way and 0 is
             provided.