def get_reverse_endian(bytes_array):
    """
    Reverse endianness in arbitrary-length bytes array
    """
    hex_str = bytes_array.hex()
    hex_list = ["".join(i) for i in zip(hex_str[::2], hex_str[1::2])]
    hex_list.reverse()
    return bytes.fromhex("".join(hex_list))