def list_tasks_in_flow(flow):
    """
    Return the names of all tasks in the flow
    :param obj flow: The flow to get the tasks from
    :return list task_names: A list of all the task names in a flow
    """
    try:
        return [
            node[0].name for node in flow.iter_nodes()
            if hasattr(node[0], 'name')
        ]
    except StopIteration:
        return list()