import tempfile


def is_ipython_kernel_cell(filename):
    """ Return True if a filename corresponds to a Jupyter Notebook cell
    """
    return (
        filename.startswith('<ipython-input-') or
        filename.startswith(tempfile.gettempdir() + '/ipykernel_') or
        filename.startswith(tempfile.gettempdir() + '/xpython_')
    )