def two_bit_flip(node):
    """Give all the nodes by flipping one or two bits of the binary number
    representation of a node."""

    node_list = list(node)
    out = set()
    bit_length = len(node_list)
    for i in range(bit_length):
        for j in range(bit_length):
            new_node = node_list[:]
            if i != j:
                new_node[i] = ('1' if node[i] == '0' else '0')
                new_node[j] = ('1' if node[j] == '0' else '0')
            else:
                new_node[i] = ('1' if node[i] == '0' else '0')
            out.add(''.join(new_node))
    return out