from imblearn.over_sampling import SMOTE

smote = SMOTE()
{% if pipeline.sparse_matrix %}
__feature_columns = __feature_train.columns
__feature_train = __feature_train.sparse.to_coo()
__feature_train, __target_train = smote.fit_resample(__feature_train, __target_train)
__feature_train =  pd.DataFrame.sparse.from_spmatrix(__feature_train, columns=__feature_columns)
{% else %}
__feature_train, __target_train = smote.fit_resample(__feature_train, __target_train)
{% endif %}
