//  [python]
def test_run_on_model_with_empty_steps(self):
        from sklearn.compose import ColumnTransformer

        # testing 'drop', 'passthrough', None as non-actionable sklearn estimators
        dataset = openml.datasets.get_dataset(128)  # iris
        task = openml.tasks.get_task(59)  # mfeat-pixel; crossvalidation

        X, y, categorical_ind, feature_names = dataset.get_data(
            target=dataset.default_target_attribute,
            dataset_format="array",
        )
        categorical_ind = np.array(categorical_ind)
        (cat_idx,) = np.where(categorical_ind)
        (cont_idx,) = np.where(~categorical_ind)

        clf = make_pipeline(
            ColumnTransformer(
                [
                    (
                        "cat",
                        make_pipeline(SimpleImputer(strategy="most_frequent"), OneHotEncoder()),
                        cat_idx.tolist(),
                    ),
                    (
                        "cont",
                        make_pipeline(SimpleImputer(strategy="median"), StandardScaler()),
                        cont_idx.tolist(),
                    ),
                ],
            ),
        )

        clf = sklearn.pipeline.Pipeline(
            [
                ("dummystep", "passthrough"),  # adding 'passthrough' as an estimator
                ("prep", clf),
                ("classifier", sklearn.svm.SVC(gamma="auto")),
            ],
        )

        # adding 'drop' to a ColumnTransformer
        if not categorical_ind.any():
            clf[1][0].set_params(cat="drop")
        if not (~categorical_ind).any():
            clf[1][0].set_params(cont="drop")

        # serializing model with non-actionable step
        run, flow = openml.runs.run_model_on_task(model=clf, task=task, return_flow=True)

        assert len(flow.components) == 3
        assert isinstance(flow.components["dummystep"], OpenMLFlow)
        assert flow.components["dummystep"].name == "passthrough"
        assert isinstance(flow.components["classifier"], OpenMLFlow)
        if LooseVersion(sklearn.__version__) < "0.22":
            assert flow.components["classifier"].name == "sklearn.svm.classes.SVC"
        else:
            assert flow.components["classifier"].name == "sklearn.svm._classes.SVC"
        assert isinstance(flow.components["prep"], OpenMLFlow)
        assert flow.components["prep"].class_name == "sklearn.pipeline.Pipeline"
        assert isinstance(flow.components["prep"].components["columntransformer"], OpenMLFlow)
        assert isinstance(
            flow.components["prep"].components["columntransformer"].components["cat"], OpenMLFlow
        )
        assert (
            flow.components["prep"].components["columntransformer"].components["cat"].name == "drop"
        )

        # de-serializing flow to a model with non-actionable step
        model = self.extension.flow_to_model(flow)
        model.fit(X, y)
        assert type(model) == type(clf)
        assert model != clf
        assert len(model.named_steps) == 3
        assert model.named_steps["dummystep"] == "passthrough"

        xml = flow._to_dict()
        new_model = self.extension.flow_to_model(OpenMLFlow._from_dict(xml))

        new_model.fit(X, y)
        assert type(new_model) == type(clf)
        assert new_model != clf
        assert len(new_model.named_steps) == 3
        assert new_model.named_steps["dummystep"] == "passthrough"