I tried to run your code from the file **[data_augmentation_using_spacy](https://github.com/kothiyayogesh/medium-article-code/blob/master/How%20I%20dealt%20with%20Imbalanced%20text%20dataset/data_augmentation_using_spacy.ipynb).ipynb**, but the function check_oos() is not defined it seems!