def make_flagsandlength(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
    """
    return [(0x7 << 4) + ((length & 0xF00) >> 8), length & 0xFF]