[Python-checkins] Use relative imports in mock and its tests to help backporting (GH-18197)