def ensure_path(self, path):
        path = self.normpath(path)
        # Ignore the root path as we already checked for that; and it
        # will always exist/can't be removed anyway...
        if path == self._root.item:
            return
        node = self._root
        for piece in self._iter_pieces(path):
            child_node = node.find(piece, only_direct=True,
                                   include_self=False)
            if child_node is None:
                child_node = self._insert_child(node, piece)
            node = child_node
Validate whether given string is IPv4.
dataset/ETHPy150Open openstack/taskflow/taskflow/persistence/backends/impl_memory.py/FakeFilesystem.ensure_path--crossover with--dataset/ETHPy150Open StackStorm/st2/st2common/st2common/util/ip_utils.py/is_ipv4