def is_valid_numpy_dtype(dtype):
    try:
        np.dtype(dtype)
    except (TypeError, __HOLE__):
        return False
    else:
        return True
dataset/ETHPy150Open pydata/xarray/xarray/core/utils.py/is_valid_numpy_dtype