### Summary

Ansible devel sanity tests failing with error: packaging Python module unavailable; unable to validate the collection

### Issue Type

Bug Report

### Component Name

ansible sanity tests

### Ansible Version

```console
$ ansible devel
```


### Configuration

```console
$ ansible-config dump --only-changed
```


### OS / Environment

mac os

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)

```
Ansible devel sanity tests is failing with `stderr: [WARNING]: packaging Python module unavailable; unable to validate collection`. Plz ref the below test failures:
[ansible-test-sanity-docker-devel](https://dashboard.zuul.ansible.com/t/ansible/build/ffc5d7c618a740bf9c783e15c2d14806)
[network-ee-sanity-tests](https://dashboard.zuul.ansible.com/t/ansible/build/b4ab02b51d76487b97356f3c6ffe76fe)

### Expected Results

Ansible sanity tests run without failure for `devel`

### Actual Results

```console
Ansible sanity tests fail for `devel`
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
if plugin_load_context.resolved and candidate_name not in plugin_load_context.redirect_list:
                            plugin_load_context.redirect_list.append(candidate_name)
                    if plugin_load_context.resolved or plugin_load_context.pending_redirect:  
                        return plugin_load_context
                except (AnsiblePluginRemovedError, AnsiblePluginCircularRedirect, AnsibleCollectionUnsupportedVersionError):
                    
                    raise
                except ImportError as ie:
                    plugin_load_context.import_error_list.append(ie)
                except Exception as ex:
                    
                    plugin_load_context.error_list.append(to_native(ex))
            if plugin_load_context.error_list:
                display.debug(msg='plugin lookup for {0} failed; errors: {1}'.format(name, '; '.join(plugin_load_context.error_list)))
            plugin_load_context.exit_reason = 'no matches found for {0}'.format(name)
            return plugin_load_context
        
        return self._find_plugin_legacy(name, plugin_load_context, ignore_deprecated, check_aliases, suffix)
    def _find_plugin_legacy(self, name, plugin_load_context, ignore_deprecated=False, check_aliases=False, suffix=None):
        """Search library and various *_plugins paths in order to find the file.
        This was behavior prior to the existence of collections.
        """
        plugin_load_context.resolved = False
        if check_aliases:
            name = self.aliases.get(name, name)
        
        
        pull_cache = self._plugin_path_cache[suffix]
        try:
            path_with_context = pull_cache[name]