def METHOD_NAME(is_su, require, temp_dir):
    isolation = {'rootfs': temp_dir}
    if not is_su:
        require(
            {
                'features': {
                    'isolation': [
                        'unprivileged_userns_clone',
                        'user',
                        'mnt',
                        'pid',
                    ]
                }
            }
        )
        isolation['namespaces'] = {
            'mount': True,
            'credential': True,
            'pid': True,
        }
    client.load('ns_inspect', isolation=isolation)
    assert not (
        client.getjson(url=f'/?path={temp_dir}')['body']['FileExists']
    ), 'temp_dir does not exists in rootfs'
    assert client.getjson(url='/?path=/proc/self')['body'][
        'FileExists'
    ], 'no /proc/self'
    assert not (
        client.getjson(url='/?path=/dev/pts')['body']['FileExists']
    ), 'no /dev/pts'
    assert not (
        client.getjson(url='/?path=/sys/kernel')['body']['FileExists']
    ), 'no /sys/kernel'
    ret = client.getjson(url='/?path=/app/python/ns_inspect')
    assert ret['body']['FileExists'], 'application exists in rootfs'