class_docstr: This class implements the `MobileViT architecture <https://arxiv.org/abs/2110.02178?context=cs.LG>`_
code: def _make_mobilenet_layer(
      opts, input_channel: int, cfg: Dict, *args, **kwargs
  ) -> Tuple[nn.Sequential, int]:
      output_channels = cfg.get("out_channels")
      num_blocks = cfg.get("num_blocks", 2)
      expand_ratio = cfg.get("expand_ratio", 4)
      block = []
  
      for i in range(num_blocks):
          stride = cfg.get("stride", 1) if i == 0 else 1
  
          layer = InvertedResidual(
              opts=opts,
              in_channels=input_channel,
              out_channels=output_channels,
              stride=stride,
              expand_ratio=expand_ratio,
          )
          block.append(layer)
          input_channel = output_channels
      return nn.Sequential(*block), input_channel
  
file_path: ml-cvnets/cvnets/models/classification/mobilevit.py
imports: import argparse
  from typing import Dict, Optional, Tuple
  from torch import nn
  from cvnets.layers import ConvLayer2d, Dropout, GlobalPool, LinearLayer
  from cvnets.models import MODEL_REGISTRY
  from cvnets.models.classification.base_image_encoder import BaseImageEncoder
  from cvnets.models.classification.config.mobilevit import get_configuration
  from cvnets.modules import InvertedResidual, MobileViTBlock
  from utils import logger
label_desc: Use image node_id 4 for calling the MobileViT obj's underlying member method code with example usage: obj._make_mobilenet_layer(opts, input_channel, cfg) and returns: nn,  input_channel