code: def shufflenet_v2(
      num_classes: int,
      input_shape: tuple,
      stages_repeats: list,
      stages_out_channels: list,
  ):
      img_input = layers.Input(shape=input_shape)
      if len(stages_repeats) != 3:
          raise ValueError(
              "expected stages_repeats as list of 3 positive ints"
          )
      if len(stages_out_channels) != 5:
          raise ValueError(
              "expected stages_out_channels as list of 5 positive ints"
          )
  
      x = ConvBNReLU(
          filters=stages_out_channels[0],
          kernel_size=3,
          strides=2,
          name="conv1",
      )(img_input)
  
      x = layers.MaxPooling2D(
          pool_size=(3, 3), strides=2, padding="same", name="maxpool"
      )(x)
  
      stage_name = ["stage{}".format(i) for i in [2, 3, 4]]
      for name, repeats, output_channels in zip(
          stage_name, stages_repeats, stages_out_channels[1:]
      ):
          for i in range(repeats):
              if i == 0:
                  x = shuffle_block_s2(
                      x,
                      output_c=output_channels,
                      stride=2,
                      prefix=name + "_{}".format(i),
                  )
              else:
                  x = shuffle_block_s1(
                      x,
                      output_c=output_channels,
                      stride=1,
                      prefix=name + "_{}".format(i),
                  )
  
      x = ConvBNReLU(filters=stages_out_channels[-1], name="conv5")(x)
  
      x = layers.GlobalAveragePooling2D(name="globalpool")(x)
  
      x = layers.Dense(units=num_classes, name="fc")(x)
      x = layers.Softmax()(x)
  
      model = Model(img_input, x, name="ShuffleNetV2_1.0")
  
      return model
  
imports: import tensorflow
  from tensorflow.keras import layers, Model
label_desc: Use image node_id 3 for calling a global function with example usage: shufflenet_v2(num_classes, input_shape, stages_repeats, stages_out_channels) and returns: model