from sklearn.cross_validation import KFold renaming and depreaction of cross_validation
Issue resolved by importing the supported package which is from sklearn.model_selection import KFold
then modifying KFold method with correct parameters as below
KFold(n_splits=2, random_state=None, shuffle=False)
i used in my code from sklearn.cross_validation import KFold and it was working without no issue .
now i got error ModuleNotFoundError: No module named 'sklearn.cross_validation'
i google it and i found that the package function is renamed to model_selection instead of cross_validation but i have to use KFold function from  sklearn.cross_validation import KFold.
the sklearn version i have is 0.20.1 with Python 3.7.1 
using KFold which is a method already implemented in  sklearn.cross_validation
from sklearn.cross_validation import KFold
expected to run sucessfully as before but i got below error:
ModuleNotFoundError: No module named 'sklearn.cross_validation'