code: def widen_transition(net_configs, noise):
      for net_config in net_configs:
          new_out_dim = int(
              net_config.average_growth_rate * net_config.first_ratio
          )
          if new_out_dim > net_config.blocks[0].out_features_dim:
              net_config.widen(
                  loc={"block": 0, "layer": 0},
                  new_width=new_out_dim,
                  noise=noise,
              )
          out_features_dim = new_out_dim
          for _i, block in enumerate(net_config.blocks[2:-1], 2):
              if isinstance(block, TransitionBlock):
                  new_out_dim = int(
                      net_config.blocks[_i - 1].out_features_dim(
                          net_config.blocks[_i - 2].out_features_dim
                      )
                      * net_config.reduction
                  )
                  if new_out_dim > block.out_features_dim:
                      net_config.widen(
                          loc={"block": _i, "layer": 0},
                          new_width=new_out_dim,
                          noise=noise,
                      )
                  out_features_dim = block.out_features_dim
              else:
                  out_features_dim = block.out_features_dim(
                      out_features_dim
                  )
  
file_path: auptimizer/src/aup/Proposer/eas/arch_search/arch_search_densenet_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.dense_net import DenseBlock, TransitionBlock
  import re
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: widen_transition(net_configs, noise) without return types