code: def wire_transform(transform_func, select_types=WireVector,
                     exclude_types=(Input, Output, Register, Const), block=None):
      
      block = working_block(block)
      for orig_wire in block.wirevector_subset(select_types, exclude_types):
          new_src, new_dst = transform_func(orig_wire)
          replace_wire(orig_wire, new_src, new_dst, block)
docs: Maps Wires to new sets of nets and wires according to a custom function
  
      :param transform_func: The function you want to run on all wires
          Function signature: func(orig_wire (WireVector)) -> src_wire, dst_wire
          src_wire is the src for the stuff you made in the transform func
          and dst_wire is the sink
  
          to indicate that the wire has not been changed, make src_wire and dst_wire both
          the original wire
      :param select_types: Type or Tuple of types of WireVectors to replace
      :param exclude_types: Type or Tuple of types of WireVectors to exclude from replacement
      :param block: The Block to replace wires on