# ... moved and adapted code from test_phase3_endpoints.py (file section) ...