def make_flagsandlength(in_length: int) -> list:
    """
    Converts a length value in a Flags and Length list with two bytes in the
    correct order.
    :param length: the length to convert. should be 12-bit value
    :return: the list with the two bytes
    """
    if (in_length > 0xFFF):
        raise ValueError(f'length must be no greater than a 12-bit value! value was {in_length}')
    return [(0x7 << 4) + ((in_length & 0xF00) >> 8), in_length & 0xFF]