@staticmethod
def _create_path(root, dict_type, path):
    """
        Create nested dicts in `root` using `dict_type` as constructor. Strings
        in `path` are used to construct the keys for nested dicts.

        Args:
            root (dict instance): Root dictionary, where the nested dicts will
                 be created.
            dict_type (dict-like class): Class which will be used to construct
                      dicts - ``dict_type()`.
            path (list/tuple of strings): List of keys for nested
                 ``dict_type``.

        Returns:
            dict: Return last nested dict (dict at last element at `path`).
        """
    for sub_path in path:
        if not isinstance(root.get(sub_path, None), dict):
            root[sub_path] = dict_type()
        root = root[sub_path]
    return root
