code: def _stack_inverted_residual(
      in_ch,
      out_ch,
      kernel_size,
      skip,
      stride,
      exp_factor,
      repeats,
      bn_momentum,
  ):
      """Creates a stack of inverted residuals."""
      assert repeats >= 1
      # First one has no skip, because feature map size changes.
      first = _InvertedResidual(
          in_ch,
          out_ch,
          kernel_size,
          stride,
          exp_factor,
          skip,
          bn_momentum=bn_momentum,
      )
      remaining = []
      for _ in range(1, repeats):
          remaining.append(
              _InvertedResidual(
                  out_ch,
                  out_ch,
                  kernel_size,
                  1,
                  exp_factor,
                  skip,
                  bn_momentum=bn_momentum,
              )
          )
      return nn.Sequential(first, *remaining)
  
imports: from nni.retiarii import basic_unit
  import nni.retiarii.nn.pytorch
  import warnings
  import torch
  import torch.nn
  import torch.nn.functional
  from nni.retiarii import model_wrapper
  import sys
  from pathlib import Path
label_desc: Use image node_id 1 for calling a global function with example usage: _stack_inverted_residual(in_ch, out_ch, kernel_size, skip, stride, exp_factor, repeats, bn_momentum) and returns: nn