def new_endpoint_ref_with_region(service_id, region, interface='public', **kwargs):
 ref = new_endpoint_ref(service_id, interface, region=region, region_id='invalid', **kwargs)
 del ref['region_id']
 return ref

def new_endpoint_ref_with_region ( service_id , region , interface = 'public' , ** kwargs ) : ref = new_endpoint_ref ( service_id , interface , region = region , region_id = 'invalid' , ** kwargs ) del ref [ 'region_id' ] return ref
define an endpoint_ref having a pre-3 .