def get_client_class(api_name, version, version_map):
try:<EOL><INDENT>client_path = version_map[str(version)]<EOL><DEDENT>except (KeyError, ValueError):<EOL><INDENT>msg = _("<STR_LIT>"<EOL>"<STR_LIT>")<EOL>msg = msg % {'<STR_LIT>': api_name, '<STR_LIT:version>': version,<EOL>'<STR_LIT>': '<STR_LIT:U+002CU+0020>'.join(version_map.keys())}<EOL>raise exceptions.UnsupportedVersion(msg)<EOL><DEDENT>return importutils.import_class(client_path)<EOL>
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