##### SUMMARY

Move the remaining files needed by `ansible-test` into the `test/lib/ansible_test/` directory. This is required to implement: https://github.com/ansible/ansible/issues/59884

##### ISSUE TYPE

Feature Idea

##### COMPONENT NAME

ansible-test

"""
    Load plugins of the specified type and track them in the specified database.
    Only plugins which have already been imported will be loaded.
    """
    plugins = dict((sc.__module__.rsplit('.', 1)[1], sc) for sc in get_subclasses(base_type))  
    for plugin in plugins:
        database[plugin] = plugins[plugin]
def load_module(path, name):  
    """Load a Python module using the given name and path."""
    if name in sys.modules:
        return
    if sys.version_info >= (3, 4):
        
        import importlib.util
        
        spec = importlib.util.spec_from_file_location(name, path)
        
        module = importlib.util.module_from_spec(spec)
        spec.loader.exec_module(module)
        sys.modules[name] = module
    else:
        
        import imp
        with open(path, 'r') as module_file:
            
            imp.load_module(name, module_file, path, ('.py', 'r', imp.PY_SOURCE))
display = Display()