def get_endpoint_region(endpoint):
    return endpoint.get('region_id') or endpoint.get('region')
Test unpublished collections can accept optional commit messages.
dataset/ETHPy150Open openstack/django_openstack_auth/openstack_auth/utils.py/get_endpoint_region--crossover with--dataset/ETHPy150Open oppia/oppia/core/domain/collection_services_test.py/CommitMessageHandlingTests.test_unpublished_collections_can_accept_commit_message