def head(task):

    if istask(task):
        return task[0]
    elif isinstance(task, list):
        return list
    else:
        return task
Return the top level node of a task
dataset/ETHPy150Open dask/dask/dask/rewrite.py/head