code: def net_transform(transform_func, block=None, **kwargs):
      
      block = working_block(block)
      with set_working_block(block, True):
          for net in block.logic.copy():
              keep_orig_net = transform_func(net, **kwargs)
              if not keep_orig_net:
                  block.logic.remove(net)
docs: Maps nets to new sets of nets according to a custom function
  
      :param transform_func:
          Function signature: func(orig_net (logicnet)) -> keep_orig_net (bool)
      :return: