code: def wider_next_dense(
      layer, start_dim, total_dim, n_add, weighted=True
  ):
      """wider next dense layer."""
      if not weighted:
          return StubDense(layer.input_units + n_add, layer.units)
      teacher_w, teacher_b = layer.get_weights()
      student_w = teacher_w.copy()
      n_units_each_channel = int(teacher_w.shape[1] / total_dim)
  
      new_weight = np.zeros(
          (teacher_w.shape[0], n_add * n_units_each_channel)
      )
      student_w = np.concatenate(
          (
              student_w[:, : start_dim * n_units_each_channel],
              add_noise(new_weight, student_w),
              student_w[
                  :,
                  start_dim
                  * n_units_each_channel : total_dim
                  * n_units_each_channel,
              ],
          ),
          axis=1,
      )
  
      new_layer = StubDense(layer.input_units + n_add, layer.units)
      new_layer.set_weights((student_w, teacher_b))
      return new_layer
  
file_path: nni/nni/algorithms/hpo/networkmorphism_tuner/layer_transformer.py
imports: import numpy
  from .layers import StubDense, StubReLU, get_batch_norm_class, get_conv_class, get_n_dim
label_desc: Use image node_id 7 for calling a global function with example usage: wider_next_dense(layer, start_dim, total_dim, n_add, weighted) and returns: new_layer, StubDense