def get_dirs_by_parent_path(
        self,
        dataset_rows: "DataTable",
        parent_path: str,
    ) -> Iterator[Node]:
        """Gets nodes from database by parent path, with optional filtering"""
        dr = dataset_rows
        query = self._find_query(
            dr,
            parent_path,
            type="dir",
            conds=[pathfunc.parent(sa.Column(dr.col_name("path"))) == parent_path],
            order_by=[dr.col_name("source"), dr.col_name("path")],
        )
        return self.get_nodes(query, dr)
Gets nodes from database by parent path, with optional filtering
src/datachain/data_storage/warehouse.py