code: def apply_wider_decision(
      wider_decision,
      net_configs,
      filter_num_list,
      units_num_list,
      noise,
  ):
      if len(net_configs) == 1:
          decision = wider_decision[0]
          net_config = net_configs[0]
          decision_mask = []
          for _i, layer in enumerate(
              net_config.layer_cascade.layers[:-1]
          ):
              if isinstance(layer, ConvLayer):
                  if layer.filter_num >= filter_num_list[-1]:
                      decision_mask.append(0.0)
                  else:
                      decision_mask.append(1.0)
                      if decision[_i]:
                          new_filter_number = layer.filter_num
                          for fn in filter_num_list:
                              if fn > new_filter_number:
                                  new_filter_number = fn
                                  break
                          net_config.widen(
                              layer_idx=_i,
                              new_width=new_filter_number,
                              noise=noise,
                          )
              elif isinstance(layer, FCLayer):
                  if layer.units >= units_num_list[-1]:
                      decision_mask.append(0.0)
                  else:
                      decision_mask.append(1.0)
                      if decision[_i]:
                          new_units_num = layer.units
                          for un in units_num_list:
                              if un > new_units_num:
                                  new_units_num = un
                                  break
                          net_config.widen(
                              layer_idx=_i,
                              new_width=new_units_num,
                              noise=noise,
                          )
              else:
                  decision_mask.append(0.0)
          decision_mask += [0.0] * (len(decision) - len(decision_mask))
          return np.array([decision_mask])
      else:
          decision_mask = []
          for _i, net_config in enumerate(net_configs):
              decision = wider_decision[_i]
              mask = apply_wider_decision(
                  [decision],
                  [net_config],
                  filter_num_list,
                  units_num_list,
                  noise,
              )
              decision_mask.append(mask)
          return np.concatenate(decision_mask, axis=0)
  
file_path: auptimizer/src/aup/Proposer/eas/arch_search/arch_search_convnet_net2net.py
imports: from ..expdir_monitor.arch_manager import ArchManager
  from ..meta_controller.base_controller import Vocabulary, EncoderNet, WiderActorNet, DeeperActorNet
  from ..meta_controller.rl_controller import ReinforceNet2NetController
  from time import gmtime, strftime, time
  from datetime import timedelta
  from ..models.layers import ConvLayer, FCLayer, PoolLayer
  import re
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: apply_wider_decision(wider_decision, net_configs, filter_num_list, units_num_list, noise) and returns: np, np