Consider the following example:
>>> from IPython.core.inputtransformer2 import TransformerManager
>>> src = """\
... foo = !ls
... !!ls
... """
>>> TransformerManager().transform_cell(src)
"foo = get_ipython().getoutput('ls')\nget_ipython().getoutput('ls')\n"
Both !ls and !!ls got transformed to get_ipython().getoutput('ls').
If I only saw the output of TransformerManager().transform_cell, would there be a way to retrieve the original source?
Is there a way to tell whether get_ipython().get_output(<some string>) came from !<some string> or !!<some string>?