def get_client_from_cli_profile(client_class, **kwargs):
cloud = get_cli_active_cloud()<EOL>parameters = {}<EOL>if '<STR_LIT>' not in kwargs or '<STR_LIT>' not in kwargs:<EOL><INDENT>resource, _ = _client_resource(client_class, cloud)<EOL>credentials, subscription_id, tenant_id = get_azure_cli_credentials(resource=resource,<EOL>with_tenant=True)<EOL>parameters.update({<EOL>'<STR_LIT>': kwargs.get('<STR_LIT>', credentials),<EOL>'<STR_LIT>': kwargs.get('<STR_LIT>', subscription_id)<EOL>})<EOL><DEDENT>args = get_arg_spec(client_class.__init__).args<EOL>if '<STR_LIT>' in args and '<STR_LIT>' not in kwargs:  <EOL><INDENT>parameters['<STR_LIT>'] = cloud.suffixes.azure_datalake_analytics_catalog_and_job_endpoint<EOL><DEDENT>elif '<STR_LIT>' in args and '<STR_LIT>' not in kwargs:<EOL><INDENT>_, base_url = _client_resource(client_class, cloud)<EOL>if base_url:<EOL><INDENT>parameters['<STR_LIT>'] = base_url<EOL><DEDENT>else:<EOL><INDENT>parameters['<STR_LIT>'] = cloud.endpoints.resource_manager<EOL><DEDENT><DEDENT>if '<STR_LIT>' in args and '<STR_LIT>' not in kwargs:<EOL><INDENT>parameters['<STR_LIT>'] = tenant_id<EOL><DEDENT>parameters.update(kwargs)<EOL>return _instantiate_client(client_class, **parameters)<EOL>
Return a SDK client initialized with current CLI credentials, CLI default subscription and CLI default cloud.

    This method will fill automatically the following client parameters:
    - credentials
    - subscription_id
    - base_url

    Parameters provided in kwargs will override CLI parameters and be passed directly to the client.

    :Example:

    .. code:: python

        from azure.common.client_factory import get_client_from_cli_profile
        from azure.mgmt.compute import ComputeManagementClient
        client = get_client_from_cli_profile(ComputeManagementClient)

    .. versionadded:: 1.1.6

    :param client_class: A SDK client class
    :return: An instantiated client
    :raises: ImportError if azure-cli-core package is not available