##### SUMMARY
The collection loader currently imports a number of things from Ansible, the heaviest of which is config/constants. This makes it heavyweight and somewhat dangerous for ansible-test and unit tests to use. Refactor it to minimize those imports and supply the necessary impls another way (constructor, DI pattern, etc).

##### ISSUE TYPE
- Feature Idea

##### COMPONENT NAME
AnsibleCollectionLoader

##### ADDITIONAL INFORMATION

match = _collection_qualified_re.match(role_name)
    if match:
        grps = match.groups()
        collection_list = ['.'.join(grps[:2])]
        role = grps[2]
    elif not collection_list:
        return None  
    else:
        role = role_name
    for collection_name in collection_list:
        try:
            role_package = u'ansible_collections.{0}.roles.{1}'.format(collection_name, role)
            
            
            pkg = import_module(role_package + u'.tasks')
            
            tasks_file = pkgutil.get_data(to_native(role_package) + '.tasks', 'main.yml')
            if tasks_file is not None:
                
                path = os.path.dirname(to_bytes(sys.modules[role_package].__file__, errors='surrogate_or_strict'))
                return role, to_text(path, errors='surrogate_or_strict'), collection_name
        except IOError:
            continue
        except Exception as ex:
            
            continue
    return None
def is_collection_ref(candidate_name):