import asyncio
import random
import tributary.streaming as ts
# Return a random value
def func():
return random.random()
# Call the random function 5 times
rand = ts.Timer(func, interval=0, count=5)
# Multiply by a constant
rand_perc = rand * 100
# Round to 2 digits
rand_rounded = rand_perc.apply(lambda x: round(x, 2))
# And print the result
p = rand_rounded.print()
p.dagre()
DagreD3Widget()
# for static export
p.graphviz()
res = ts.run(p)