def kernel(name):
    """Dask kernel to test pickling/unpickling and __repr__.
    Must be global to make it pickleable.
    """
    global kernel_call_count
    kernel_call_count += 1
    return np.ones(1, dtype=np.int64)
Dask kernel to test pickling/unpickling and __repr__.
    Must be global to make it pickleable.
    
xarray/tests/test_dask.py