def get_input_masks(nx_node, nx_graph):
    """
    Return input masks for all inputs of nx_node.
    """
    input_edges = list(nx_graph.in_edges(nx_node['key']))
    input_masks = [nx_graph.nodes[input_node]['output_mask'] for input_node, _ in input_edges]
    return input_masks