def METHOD_NAME(self, X, *args, **kwargs):
    assert isinstance(X, pd.DataFrame)
    df = pd.DataFrame(columns=X.columns, index=X.index)
    if isinstance(self.imputers, dict):
        for _, content in self.imputers.items():
            mask = content["mask"]
            imputers = content["impute"]
            imputed_data = np.array(
                [imp.METHOD_NAME(X.loc[mask, :]) for imp in imputers]
            )
            mean = np.mean(imputed_data, axis=0)
            df.loc[mask, ~pd.isnull(X.loc[mask, :]).all(axis=0)] = mean
        return df
    else:
        imputed_data = np.array([imp.METHOD_NAME(X) for imp in self.imputers])
        mean = np.mean(imputed_data, axis=0)
        df.loc[:, ~pd.isnull(X).all(axis=0)] = mean
        return df