def METHOD_NAME():
    data = {"key1": "item1", "key2": [1, 2, "item2"], "key3": 45, 45: str}
    new_data = win_event._to_bytes(data, "utf-8", False)
    assert "key1" in new_data
    assert new_data["key1"] == b"item1"
    assert new_data["key2"][2] == b"item2"