def METHOD_NAME(self):
    @dsl.pipeline(name='test-pipeline')
    def my_pipeline():
        dsl.importer(artifact_uri='dummy', artifact_class=Artifact)
    with self.assertRaisesRegex(
            ValueError,
            'dsl.importer is not supported with v1 compiler.',
    ):
        compiler.Compiler(
            mode=v1dsl.PipelineExecutionMode.V2_COMPATIBLE).compile(
                pipeline_func=my_pipeline, package_path='result.json')