def __len__(self):
        try:
            return self.shape[0]
        except __HOLE__:
            raise TypeError('len() of unsized object')
dataset/ETHPy150Open pydata/xarray/xarray/core/utils.py/NdimSizeLenMixin.__len__