code: def _remove_wire_nets(block):
      
  
      wire_src_dict = _ProducerList()
      wire_removal_set = set()  # set of all wirevectors to be removed
  
      # one pass to build the map of value producers and
      # all of the nets and wires to be removed
      for net in block.logic:
          if net.op == 'w':
              wire_src_dict[net.dests[0]] = net.args[0]
              if not isinstance(net.dests[0], Output):
                  wire_removal_set.add(net.dests[0])
  
      # second full pass to create the new logic without the wire nets
      new_logic = set()
      for net in block.logic:
          if net.op != 'w' or isinstance(net.dests[0], Output):
              new_args = tuple(wire_src_dict.find_producer(x) for x in net.args)
              new_net = LogicNet(net.op, net.op_param, new_args, net.dests)
              new_logic.add(new_net)
  
      # now update the block with the new logic and remove wirevectors
      block.logic = new_logic
      for dead_wirevector in wire_removal_set:
          del block.wirevector_by_name[dead_wirevector.name]
          block.wirevector_set.remove(dead_wirevector)
  
      block.sanity_check()
docs: Remove all wire nodes from the block.