def try_import_dali():
    """Try import NVIDIA DALI at runtime.
    """
    try:
        dali = __import__('nvidia.dali', fromlist=['pipeline', 'ops', 'types'])
        dali.Pipeline = dali.pipeline.Pipeline
    except ImportError:


        class dali:


            class Pipeline:

                def __init__(self):
                    raise NotImplementedError(
                        'DALI not found, please check if you installed it correctly.'
                        )
    return dali
