def assert_valid_pipeline(pipeline):
    """Quick check to ensure the pipeline is an mlens Pipeline"""
    cls = str(pipeline.__class__).split("'")[1].lower()
    if not cls.endswith('pipeline') and not cls.startswith('mlens'):
        raise ValueError('Expect mlens Pipeline instance. Got %r' % pipeline)
