##### SUMMARY

Running tests on collections which have dependencies with the `--docker` option is not currently supported. Only the collection being tested is copied into the container.

All collections in the same collection root should be copied into the container. Support for dependencies in other collection roots will not be supported. It will be up to the user to make sure all the necessary dependencies are already installed in the same collection root. If unnecessary collections are present, those will be copied as well.

##### ISSUE TYPE

Feature Idea

##### COMPONENT NAME

ansible-test

"""Create a layout using the given root and paths."""
def paths_to_tree(paths):  
    """Return a filesystem tree from the given list of paths."""
    tree = {}, []
    for path in paths:
        parts = path.split(os.sep)
        root = tree
        for part in parts[:-1]:
            if part not in root[0]:
                root[0][part] = {}, []
            root = root[0][part]
        root[1].append(path)
    return tree
def get_tree_item(tree, parts):  
    """Return the portion of the tree found under the path given by parts, or None if it does not exist."""
    root = tree
    for part in parts:
        root = root[0].get(part)
        if not root:
            return None
    return root