def get_node_by_path(self, dataset_rows: "DataTable", path: str) -> Node:
        """Gets node that corresponds to some path"""
        if path == "":
            return Node.root()
        dr = dataset_rows
        if not path.endswith("/"):
            query = dr.select().where(
                dr.c("path") == path,
                dr.c("is_latest") == true(),
            )
            node = next(self.get_nodes(query, dr), None)
            if node:
                return node
            path += "/"
        query = sa.select(1).where(
            dr.select()
            .where(
                dr.c("is_latest") == true(),
                dr.c("path").startswith(path),
            )
            .exists()
        )
        row = next(self.db.execute(query), None)
        if not row:
            raise FileNotFoundError(f"Unable to resolve path {path}")
        path = path.removesuffix("/")
        return Node.from_dir(path)
Gets node that corresponds to some path
src/datachain/data_storage/warehouse.py