code: def build_vit(config):
      """build vit model from config"""
      model = VisualTransformer(
          image_size=config.DATA.IMAGE_SIZE,
          patch_size=config.MODEL.TRANS.PATCH_SIZE,
          in_channels=config.DATA.IMAGE_CHANNELS,
          num_classes=config.MODEL.NUM_CLASSES,
          embed_dim=config.MODEL.TRANS.EMBED_DIM,
          depth=config.MODEL.TRANS.DEPTH,
          num_heads=config.MODEL.TRANS.NUM_HEADS,
          attn_head_size=config.MODEL.TRANS.ATTN_HEAD_SIZE,
          mlp_ratio=config.MODEL.TRANS.MLP_RATIO,
          qkv_bias=config.MODEL.TRANS.QKV_BIAS,
          dropout=config.MODEL.DROPOUT,
          attention_dropout=config.MODEL.ATTENTION_DROPOUT,
          droppath=config.MODEL.DROPPATH,
          train_from_scratch=False,
      )
      return model
  
imports: import copy
  import paddle
  import paddle.nn
  from disco_diffusion_ernievil_base.vit_b_16x.ernievil2.transformers.droppath import DropPath
label_desc: Use image node_id 1 for calling a global function with example usage: build_vit(config) and returns: model