def _create_mbap_header(slave_id, pdu):
<EOL>transaction_id = randint(<NUM_LIT:0>, <NUM_LIT>)<EOL>length = len(pdu) + <NUM_LIT:1><EOL>return struct.pack('<STR_LIT>', transaction_id, <NUM_LIT:0>, length, slave_id)<EOL>
Return byte array with MBAP header for PDU.

    :param slave_id: Number of slave.
    :param pdu: Byte array with PDU.
    :return: Byte array of 7 bytes with MBAP header.