@staticmethod
def get_option_nibble(optionvalue):
    """
        Returns the 4-bit option header value.

        :param optionvalue: the option value (delta or length) to be encoded.
        :return: the 4-bit option header value.
         """
    if optionvalue <= 12:
        return optionvalue
    elif optionvalue <= 255 + 13:
        return 13
    elif optionvalue <= 65535 + 269:
        return 14
    else:
        raise AttributeError('Unsupported option delta ' + optionvalue)
