def get_client_class(api_name, version, version_map):
    """Returns the client class for the requested API version

    :param api_name: the name of the API, e.g. 'compute', 'image', etc
    :param version: the requested API version
    :param version_map: a dict of client classes keyed by version
    :rtype: a client class for the requested API version
    """
    try:
        client_path = version_map[str(version)]
    except (__HOLE__, ValueError):
        msg = "Invalid %s client version '%s'. must be one of: %s" % (
              (api_name, version, ', '.join(list(version_map.keys()))))
        raise exceptions.UnsupportedVersion(msg)

    return importutils.import_class(client_path)
dataset/ETHPy150Open dtroyer/python-openstackclient/openstackclient/common/utils.py/get_client_class