def METHOD_NAME(pipeline, node_id, io):
    node = pipeline["all_nodes"][node_id]
    refer_nodes = []
    flow_direction = PWE.source if io == PWE.incoming else PWE.target
    for flow_id in format_to_list(node[io]):
        refer_nodes.append(pipeline[PWE.flows][flow_id][flow_direction])
    return refer_nodes