Trustworthy Machine Learning under Distribution Shifts