Spin–orbit interaction and weak localization in heterostructures