def _req_directory(self, cid):
        res = self._req_files(cid=cid, offset=0, limit=1, show_dir=1)
        path = res['path']
        count = res['count']
        for d in path:
            if str(d['cid']) == str(cid):
                res = {
                    'cid': d['cid'],
                    'name': d['name'],
                    'pid': d['pid'],
                    'count': count,
                }
                return res
        else:
            raise RequestFailure('No directory found.')
Calculate the plot grid shape given a reference dataset. 
dataset/ETHPy150Open shichao-an/115wangpan/u115/api.py/API._req_directory--crossover with--dataset/ETHPy150Open apache/climate/ocw-ui/backend/processing.py/_calculate_grid_shape