def METHOD_NAME(code):
    """Transform IPython syntax to pure Python syntax
    Parameters
    ----------
    code : str
        IPython code, to be transformed to pure Python
    """
    try:
        from IPython.core.inputtransformer2 import TransformerManager
    except ImportError:
        warnings.warn(
            "IPython is needed to transform IPython syntax to pure Python."
            " Install ipython if you need this functionality.",
            stacklevel=2,
        )
        return code
    else:
        isp = TransformerManager()
        return isp.transform_cell(code)