##### SUMMARY
See https://github.com/ansible/ansible/blob/88d8cf8197c53edd3bcdcd21429eb4c2bfbf0f6a/lib/ansible/module_utils/basic.py#L699-L706

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
lib/ansible/module_utils/basic.py

##### ANSIBLE VERSION
```paste below
2.9
devel
```

self.log('Getting management service client {0}'.format(client_type.__name__))
        self.check_client_version(client_type)
        client_argspec = inspect.getargspec(client_type.__init__)
        if not base_url:
            
            base_url = self.azure_auth._cloud_environment.endpoints.resource_manager
        client_kwargs = dict(credentials=self.azure_auth.azure_credentials, subscription_id=self.azure_auth.subscription_id, base_url=base_url)
        api_profile_dict = {}
        if self.api_profile:
            api_profile_dict = self.get_api_profile(client_type.__name__, self.api_profile)
        
        
        if api_profile_dict and 'profile' in client_argspec.args:
            client_kwargs['profile'] = api_profile_dict
        
        
        if 'api_version' in client_argspec.args:
            profile_default_version = api_profile_dict.get('default_api_version', None)
            if api_version or profile_default_version:
                client_kwargs['api_version'] = api_version or profile_default_version
                if 'profile' in client_kwargs:
                    
                    client_kwargs.pop('profile')
        client = client_type(**client_kwargs)
        
        try:
            getattr(client, "models")
        except AttributeError:
            def _ansible_get_models(self, *arg, **kwarg):