def _get_sm_endpoint(client, **kwargs):
    """Get an endpoint for smapi using the provided keystone client."""
    return client.auth_ref.service_catalog.url_for(
        service_type=kwargs.get('service_name') or 'smapi',
        endpoint_type=kwargs.get('endpoint_type') or 'public',
        region_name=kwargs.get('os_region_name') or 'RegionOne')