MCPcopy Create free account
hub / github.com/dask/dask / NodeCounter

Class NodeCounter

dask/tests/test_graph_manipulation.py:25–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24
25class NodeCounter:
26 def __init__(self):
27 self.n = 0
28
29 def __dask_tokenize__(self):
30 return type(self), self.n
31
32 def f(self, x):
33 time.sleep(random.random() / 100)
34 self.n += 1
35 return x
36
37
38def assert_no_common_keys(a, b, omit=None, *, layers: bool) -> None:

Callers 3

demo_tuplesFunction · 0.85
test_bindFunction · 0.85

Calls

no outgoing calls

Tested by 3

demo_tuplesFunction · 0.68
test_bindFunction · 0.68