def test_default_output_processor_rce2() -> None:
    """
    Test that output processor prevents RCE.
    https://github.com/run-llama/llama_index/issues/7054#issuecomment-1829141330 .
    """
    df = pd.DataFrame(
        {
            "city": ["Toronto", "Tokyo", "Berlin"],
            "population": [2930000, 13960000, 3645000],
        }
    )

    injected_code = "().__class__.__mro__[-1].__subclasses__()[137].__init__.__globals__['system']('ls')"

    parser = PandasInstructionParser(df=df)
    output = parser.parse(injected_code)

    assert (
        "Execution of code containing references to private or dunder methods" in output
    ), "Injected code executed successfully!"

    Test that output processor prevents RCE.
    https://github.com/run-llama/llama_index/issues/7054#issuecomment-1829141330 .
    
llama-index-experimental/tests/test_pandas.py