code: def gen_supernet(flops_minimum=0, flops_maximum=600, **kwargs):
      choices = {"kernel_size": [3, 5, 7], "exp_ratio": [4, 6]}
  
      num_features = 1280
  
      # act_layer = HardSwish
      act_layer = Swish
      arch_def = [
          # stage 0, 112x112 in
          ["ds_r1_k3_s1_e1_c16_se0.25"],
          # stage 1, 112x112 in
          [
              "ir_r1_k3_s2_e4_c24_se0.25",
              "ir_r1_k3_s1_e4_c24_se0.25",
              "ir_r1_k3_s1_e4_c24_se0.25",
              "ir_r1_k3_s1_e4_c24_se0.25",
          ],
          # stage 2, 56x56 in
          [
              "ir_r1_k5_s2_e4_c40_se0.25",
              "ir_r1_k5_s1_e4_c40_se0.25",
              "ir_r1_k5_s2_e4_c40_se0.25",
              "ir_r1_k5_s2_e4_c40_se0.25",
          ],
          # stage 3, 28x28 in
          [
              "ir_r1_k3_s2_e6_c80_se0.25",
              "ir_r1_k3_s1_e4_c80_se0.25",
              "ir_r1_k3_s1_e4_c80_se0.25",
              "ir_r2_k3_s1_e4_c80_se0.25",
          ],
          # stage 4, 14x14in
          [
              "ir_r1_k3_s1_e6_c96_se0.25",
              "ir_r1_k3_s1_e6_c96_se0.25",
              "ir_r1_k3_s1_e6_c96_se0.25",
              "ir_r1_k3_s1_e6_c96_se0.25",
          ],
          # stage 5, 14x14in
          [
              "ir_r1_k5_s2_e6_c192_se0.25",
              "ir_r1_k5_s1_e6_c192_se0.25",
              "ir_r1_k5_s2_e6_c192_se0.25",
              "ir_r1_k5_s2_e6_c192_se0.25",
          ],
          # stage 6, 7x7 in
          ["cn_r1_k1_s1_c320_se0.25"],
      ]
  
      sta_num, arch_def, resolution = search_for_layer(
          flops_op_dict, arch_def, flops_minimum, flops_maximum
      )
  
      if sta_num is None or arch_def is None or resolution is None:
          raise ValueError("Invalid FLOPs Settings")
  
      model_kwargs = dict(
          block_args=decode_arch_def(arch_def),
          choices=choices,
          num_features=num_features,
          stem_size=16,
          norm_kwargs=resolve_bn_args(kwargs),
          act_layer=act_layer,
          se_kwargs=dict(
              act_layer=nn.ReLU,
              gate_fn=hard_sigmoid,
              reduce_mid=True,
              divisor=8,
          ),
          **kwargs,
      )
      model = SuperNet(**model_kwargs)
      return model, sta_num, resolution
  
imports: from lib.utils.builder_util import *
  from lib.utils.search_structure_supernet import *
  from lib.models.builders.build_supernet import *
  from lib.utils.op_by_layer_dict import flops_op_dict
  from timm.models.layers import SelectAdaptivePool2d
  from timm.models.layers.activations import hard_sigmoid
label_desc: Use image node_id 1 for calling a global function with example usage: gen_supernet(flops_minimum, flops_maximum) and returns: model,  sta_num,  resolution