def _checkColumns(self, cols, desc):
        """Check that `cols` has all the accessors for `self._TestTDescr`."""

        # ``_desc`` is a leaf column and ``cols`` a ``Column``.
        if isinstance(desc, t.Col):
            return isinstance(cols, t.Column)

        # ``_desc`` is a description object and ``cols`` a ``Cols``.
        descColumns = desc._v_colobjects
        for colName in descColumns:
            if colName not in cols._v_colnames:
                return False
            if not self._checkColumns(cols._f_col(colName),
                                      descColumns[colName]):
                return False

        return True
dataset/ETHPy150Open PyTables/PyTables/tables/tests/test_nestedtypes.py/CreateTestCase._checkColumns/original