### Summary

I'm seeing some breakage in collections caused (very likely) by #73703:
1. `AttributeError: 'AnsibleModule' object has no attribute '_check_type_dict'` (community.general, infoblox.nios_modules);
2. `ImportError: cannot import name 'handle_aliases'` (from `ansible.module_utils.common.parameters`) (community.crypto, community.sops).

While 1. could be considered 'own fault' because it is a private API, 2. looks like a bug, since that's a break in a public interface.

### Issue Type

Bug Report

### Component Name

core

### Ansible Version

devel

### Configuration

.

### OS / Environment

.

### Steps to Reproduce

.

### Expected Results

.

### Actual Results

.
""" Helper method to sanitize_keys() to build deferred_removals and avoid deep recursion. """
    if isinstance(value, (text_type, binary_type)):
        return value
    if isinstance(value, Sequence):
        if isinstance(value, MutableSequence):
            new_value = type(value)()
        else:
            new_value = []  
        deferred_removals.append((value, new_value))
        return new_value
    if isinstance(value, Set):
        if isinstance(value, MutableSet):
            new_value = type(value)()
        else:
            new_value = set()  
        deferred_removals.append((value, new_value))
        return new_value
    if isinstance(value, Mapping):
        if isinstance(value, MutableMapping):
            new_value = type(value)()
        else:
            new_value = {}  
        deferred_removals.append((value, new_value))
        return new_value
    if isinstance(value, tuple(chain(integer_types, (float, bool, NoneType)))):
        return value
    if isinstance(value, (datetime.datetime, datetime.date)):
        return value
    raise TypeError('Value of unknown type: %s, %s' % (type(value), value))
def _validate_elements(wanted_type, parameter, values, options_context=None, errors=None):