ImportError: cannot import name 'deprecated_endpoints'

Source code:

from tensorflow.python.util.deprecation import deprecated_endpoints

Error:

Import error: cannot import name 'deprecated_endpoints'

Could someone help me to resolve this.